| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /** @var \Illuminate\Database\Eloquent\Factory $factory */
- use App\OwnerStoreOutFeeDetail;
- use Faker\Generator as Faker;
- $factory->define(OwnerStoreOutFeeDetail::class, function (Faker $faker) {
- $step = ['0-20000', '20000-50000', '50000-100000'];
- $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),
- 'commodity_id' => random_int(1, 100),
- 'owner_id' => random_int(1, 100),
- 'source_bill' => $faker->uuid,
- 'unit_price' => $price,
- 'unit_id' => random_int(1, 3),
- 'amount' => $amount,
- 'step' => $faker->randomElement($step),
- 'tax_fee' => random_int(1, 100),//税费
- 'sku' => $faker->uuid,//商家编码
- 'packing_material_fee' => random_int(1, 100),//耗材费
- 'barcode' => $faker->uuid,//商品条码
- 'work_name' => $faker->randomElement($work_names),//作业名称
- 'fee' => $price * $amount,//费用
- 'price_remark' => '起步费:2.2元(5件以内),续费:0.2元/件',
- 'created_at' => now()->subMonth()->startOfMonth()->addDays(random_int(0, 28)),
- 'updated_at' => now()->subMonth()->startOfMonth()->addDays(random_int(0, 28)),
- ];
- });
|