define(OwnerStoragePriceModel::class, function (Faker $faker) { $counting_type = ['包仓', '灵活用仓', '统单价']; $using_type = ['常温', '恒温']; $discount_type = ['无减免', '按单减免', '固定减免']; return [ "counting_type" => $counting_type[array_rand($counting_type)], //计费类型 "using_type" => $using_type[array_rand($using_type)], //用仓类型 "minimum_area" => mt_rand(100, 1000) / 50, //最低起租面积 "price" => mt_rand(1, 20) / 10, //单价 "discount_type" => $discount_type[array_rand($discount_type)], //减免类型 "discount_value" => mt_rand(0, 10) / 12, //减免值 // "unit_id" => factory(\App\Unit::class) , //单位ID 'unit_id' => random_int(1, 7), 'time_unit_id' => random_int(8, 11), 'name' => $faker->title, ]; });