<?php

/**
 * @var \Illuminate\Database\Eloquent\Factory $factory
 */
use App\Order;
use Faker\Generator as Faker;


$factory->define(Order::class, function (Faker $faker) {
    $status = ['处理中','未处理','已处理','取消','异常'];
    $wms_status = ['分配完成','部分分配','订单完成'];
    return [
        'status' => $status[rand(0,4)],
        'created_at'=>$faker->dateTime->format('y-m-d'),
        'code' => $faker->uuid,
        'client_code' =>$faker->uuid,
        'consignee_name'=>$faker->uuid,
        'consignee_phone' => $faker->phoneNumber,
        'province' => $faker->state,
        'city' =>$faker->city,
        'district'=>$faker->secondaryAddress,
        'address' => $faker->address,
        'wms_status' => $wms_status[rand(0,2)],
        'wms_edittime' => $faker->dateTimeBetween( '-30 hour', 'now',  null),
        'owner_id' => $faker->numberBetween(0,10)
    ];
});
