<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\OwnerFeeDetail;
use Faker\Generator as Faker;

$factory->define(OwnerFeeDetail::class, function (Faker $faker) {
    $type = ["发货","收货","增值服务"];
    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,     //物流费
    ];
});
