ProcessFactory.php 847 B

123456789101112131415161718192021222324
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\Process;
  4. use Faker\Generator as Faker;
  5. $factory->define(Process::class, function (Faker $faker) {
  6. $status = ['待审核', '已驳回', '待接单', '待加工', '加工中', '待验收', '待交接', '交接完成'];
  7. return [
  8. 'code' => $faker->uuid,
  9. 'owner_id' => random_int(1, 100),
  10. 'process_method_id' => random_int(1, 10),
  11. 'unit_price' => random_int(1, 100),
  12. 'status' => $faker->randomElement($status),
  13. 'remark' => $faker->sentence,
  14. 'balance_remark' => $faker->sentence,
  15. 'amount' => random_int(1, 100),
  16. 'completed_amount' => random_int(1, 100),
  17. 'created_at' => now()->subMonth(),
  18. 'updated_at' => now()->subMonth(),
  19. "designate_id" => random_int(1, 100),
  20. ];
  21. });