OwnerPriceOperationItemFactory.php 983 B

123456789101112131415161718192021
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\OwnerPriceOperationItem;
  4. use Faker\Generator as Faker;
  5. $factory->define(OwnerPriceOperationItem::class, function (Faker $faker) {
  6. $strategy = ['起步', '默认', '特征'];
  7. return [
  8. "owner_price_operation_id"=>random_int(1,100), //作业计费ID
  9. "strategy"=>$faker->randomElement($strategy), //子策略
  10. "amount"=>random_int(1,100), //起步数
  11. "unit_id"=>random_int(1,7), //单位ID
  12. "unit_price"=>random_int(1,100), //单价
  13. "feature"=>random_int(1,100), //特征
  14. "priority"=>random_int(1,100), //优先级 值越大越高
  15. "discount_price"=>random_int(1,100), //减免单价
  16. "odd_price"=>random_int(1,100), //零头价
  17. ];
  18. });