OwnerBillReportFactory.php 842 B

12345678910111213141516171819202122
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\OwnerBillReport;
  4. use Faker\Generator as Faker;
  5. $factory->define(OwnerBillReport::class, function (Faker $faker) {
  6. $initial_fee = mt_rand(0, 50000) / 10;
  7. $confirm_fee = mt_rand(0, 50000) / 10;
  8. return [
  9. // "owner_id" => factory(\App\Owner::class), //项目ID
  10. "counting_month" => $faker->date(), //结算月
  11. // "initial_fee" => $initial_fee, //原始账单金额
  12. "confirm_fee" => $confirm_fee, //确认账单金额
  13. "difference" => $confirm_fee - $initial_fee, //差额
  14. "confirmed" => "否", //确认状态
  15. "work_fee" => mt_rand(10, 100), //操作费
  16. "logistic_fee" => mt_rand(10, 100), //物流费
  17. "storage_fee" => mt_rand(10, 100), //仓储费
  18. ];
  19. });