InventoryFactory.php 530 B

1234567891011121314151617181920212223
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\InventoryAccount;
  4. use App\Owner;
  5. use Faker\Generator as Faker;
  6. $factory->define(InventoryAccount::class, function (Faker $faker) {
  7. $owners=Owner::select('id')->get();
  8. return [
  9. 'owner_id'=>$owners[1],
  10. 'type'=>'动盘',
  11. 'start_at'=>now(),
  12. 'end_at'=>now(),
  13. 'total'=>3,
  14. 'processed'=>0,
  15. 'difference'=>0,
  16. 'returned'=>0,
  17. 'deleted_at'=>null,
  18. 'created_at'=>now(),
  19. ];
  20. });