Skip to content

Commit

Permalink
Use RateCategory in Rate factory #42
Browse files Browse the repository at this point in the history
  • Loading branch information
chx2 committed Mar 9, 2021
1 parent 8b0fa93 commit a004228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database/factories/RateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Illuminate\Database\Eloquent\Factories\Factory;
use Tipoff\Bookings\Models\Rate;
use Tipoff\Bookings\Models\RateCategory;

class RateFactory extends Factory
{
Expand All @@ -29,6 +30,7 @@ public function definition()
'amount' => $this->faker->numberBetween(0, 9999),
'rate_type' => $types[array_rand($types)],
'participant_limit' => $this->faker->numberBetween(0, 100),
'rate_category_id' => RateCategory::factory()->create()->id,
'creator_id' => randomOrCreate(app('user')),
'updater_id' => randomOrCreate(app('user'))
];
Expand Down

0 comments on commit a004228

Please sign in to comment.