|
|
@@ -6,22 +6,26 @@ use App\OwnerStoreFeeDetail;
|
|
|
use Faker\Generator as Faker;
|
|
|
|
|
|
$factory->define(OwnerStoreFeeDetail::class, function (Faker $faker) {
|
|
|
+ $prices = [1.2, 1.3, 1.5, 1.5];
|
|
|
+ $work_names = ['入库费1', '入库费2'];
|
|
|
+
|
|
|
+ $price = $faker->randomElement($prices);
|
|
|
+ $amount = random_int(1, 100);
|
|
|
+
|
|
|
return [
|
|
|
//
|
|
|
'owner_fee_detail_id' => random_int(1, 100),
|
|
|
- 'owner_price_operation_id' => random_int(1, 100),
|
|
|
- 'unit_id' => random_int(1, 11),
|
|
|
- 'unit_price' => mt_rand(10, 100),
|
|
|
- 'amount' => mt_rand(10, 100),
|
|
|
- 'owner_id' => 8,
|
|
|
- 'store_item_id' => random_int(1, 100),
|
|
|
- 'fee' => random_int(1, 100),//费用
|
|
|
+ 'unit_id' => random_int(1, 3),
|
|
|
+ 'unit_price' => $price,
|
|
|
+ 'amount' => $amount,
|
|
|
+ 'owner_id' => random_int(1, 100),
|
|
|
+ 'fee' => $price * $amount,//费用
|
|
|
'commodity_id' => random_int(1, 100),
|
|
|
'packing_material_fee' => random_int(1, 100),//包材费
|
|
|
'tax_fee' => random_int(1, 100),//税费
|
|
|
'sku' => $faker->uuid,//sku
|
|
|
'barcode' => $faker->uuid,//条码
|
|
|
- 'work_name' => $faker->name,//条码
|
|
|
+ 'work_name' => $faker->randomElement($work_names),//作业名称
|
|
|
'asn_code' => $faker->uuid,//条码
|
|
|
'created_at' => now()->subMonth()->startOfMonth()->addDays(random_int(0, 28)),
|
|
|
'updated_at' => now()->subMonth()->startOfMonth()->addDays(random_int(0, 28)),
|