define(OwnerFeeDetail::class, function (Faker $faker) { $type = ["发货", "收货", "增值服务"]; $province = ['北京', '广东省', '湖北省', '广东省', '四川省', '上海', '山西省', '上海', '江西省', '贵州省', '湖南省', '广东省', '云南省', '山东省', '贵州省', '云南省', '新疆维吾尔自治区', '辽宁省', '福建省']; return [ // "owner_id" => factory(\App\Owner::class), //货主ID "worked_at" => $faker->date(),//作业时间 "type" => $type[array_rand($type)],//类型 // "shop_id" => factory(\App\Shop::class),//店铺ID "operation_bill" => \Illuminate\Support\Str::random(10),//发/收/退/提货单号 "consignee_name" => $faker->name, //收件人 "consignee_phone" => $faker->phoneNumber, //收件人电话 "commodity_amount" => mt_rand(0, 100), //商品数量 "logistic_bill" => \Illuminate\Support\Str::random(12), //快递单号 "volume" => mt_rand(10, 2600) / 88,//体积 "weight" => mt_rand(10, 2600) / 88, //重量 "work_fee" => mt_rand(100, 10000) / 10, //作业费 "logistic_fee" => mt_rand(100, 10000) / 10, //物流费 "logistic_tax_fee" => mt_rand(100, 10000) / 10, //物流税费 "province" => $faker->randomElement($province), //物流费 "logistic_id" => rand(1,100), //物流费 'created_at' => now()->subMonth()->startOfMonth()->addDays(random_int(1, 28)), ]; });