OwnerAreaReportFactory.php 963 B

123456789101112131415161718192021
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\OwnerAreaReport;
  4. use Faker\Generator as Faker;
  5. $factory->define(OwnerAreaReport::class, function (Faker $faker) {
  6. $status = ['编辑中','已完成',"编辑中","编辑中"];
  7. return [
  8. // "owner_id" => factory(\App\Owner::class), //货主ID
  9. "counting_month" => $faker->date(), //结算月
  10. // "owner_storage_price_model_id" => factory(\App\OwnerStoragePriceModel::class), //仓储计费ID
  11. // "user_owner_group_id" => factory(\App\UserOwnerGroup::class), //项目组ID
  12. "area_on_tray" => mt_rand(5,1000) / 6, //货物整托
  13. "area_on_half_tray" => mt_rand(5,1000) / 6, //货物半托
  14. "area_on_flat" => mt_rand(5,1000) / 6, //平面区面积
  15. "accounting_area" => mt_rand(50,10000) / 6, //结算面积
  16. "status" => $status[array_rand($status)] //状态
  17. ];
  18. });