| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- /** @var \Illuminate\Database\Eloquent\Factory $factory */
- use Faker\Generator as Faker;
- $factory->define(\App\Waybill::class, function (Faker $faker) {
- $created_at = $faker->dateTimeThisMonth(now()->subMonth());
- $updated_at = $faker->dateTimeThisMonth($created_at);
- $types = ['直发车', '专线'];
- $status = ['未审核', '已审核', '待重审', '待终审', '已完结', '无模型',];
- return [
- 'created_at'=>$created_at,
- 'updated_at'=>$updated_at,
- 'type'=>$faker->randomElement($types),
- 'waybill_number'=>$faker->uuid,
- 'source_bill'=>$faker->uuid,
- 'owner_id'=>random_int(1,100),
- 'wms_bill_number'=>$faker->uuid,
- 'origination'=>$faker->city,
- 'destination'=>$faker->city,
- 'recipient'=>$faker->name,
- 'recipient_mobile'=>$faker->phoneNumber,
- 'charge'=>random_int(1,100),
- 'collect_fee'=>random_int(1,100),
- 'ordering_remark'=>$faker->sentence,
- 'logistic_id'=>random_int(1,100),
- 'carrier_bill'=>$faker->uuid,
- 'origination_city_id'=>random_int(1,10),
- 'destination_city_id'=>random_int(1,10),
- 'warehouse_weight'=>random_int(1,10),
- 'warehouse_weight_unit_id'=>random_int(1,10),
- 'carrier_weight'=>random_int(1,10),
- 'carrier_weight_unit_id'=>random_int(1,10),
- 'carType_id'=>random_int(1,10),
- 'fee'=>random_int(1,10),
- 'pick_up_fee'=>random_int(1,10),
- 'other_fee'=>random_int(1,10),
- 'dispatch_remark'=>$faker->sentence,
- 'waybill_price_model_id'=>random_int(1,10),
- 'warehouse_weight_other'=>random_int(1,10),
- 'warehouse_weight_unit_id_other'=>random_int(1,10),
- 'carrier_weight_other'=>random_int(1,10),
- 'carrier_weight_unit_id_other'=>random_int(1,10),
- 'car_owner_info'=>$faker->sentence,
- 'status'=>$faker->randomElement($status),
- 'mileage'=>random_int(1,10),
- 'amount'=>random_int(1,10),
- 'inquire_tel'=>$faker->phoneNumber,
- 'amount_unit_id'=>random_int(1,7),
- 'other_charge'=>random_int(1,100),
- 'other_charge_remark'=>$faker->sentence,
- 'deliver_at'=>now(),
- 'district_id'=>random_int(1,10),
- 'order_id'=>random_int(2511,100000),
- 'is_to_pay'=>random_int(0,1),
- ];
- });
|