Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AJAYSINGHBISHT12 committed Jul 9, 2023
1 parent b971983 commit f10671c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class CodeTrekApplicantsTableSeeder extends Seeder
*/
public function run()
{
// Model::unguard();

CodeTrekApplicant::factory()->count(50)->create();
}
}
14 changes: 12 additions & 2 deletions Modules/CodeTrek/Database/factories/CodeTrekApplicantFactory.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

namespace Modules\CodeTrek\Database\Factories;

use Modules\CodeTrek\Entities\CodeTrekApplicant;
use Illuminate\Database\Eloquent\Factories\Factory;

class CodeTrekApplicantFactory extends Factory
Expand All @@ -11,10 +11,20 @@ class CodeTrekApplicantFactory extends Factory
*
* @return array
*/
protected $model = CodeTrekApplicant::class;
public function definition()
{
return [
//
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'email' => $this->faker->unique()->safeEmail,
'github_user_name' => $this->faker->userName,
'phone' => $this->faker->phoneNumber,
'status' => 'active',
'course' => $this->faker->randomElement(['Computer Science', 'Engineering', 'Mathematics']),
'start_date' => $this->faker->date(),
'graduation_year' => $this->faker->year,
'university' => $this->faker->company,
];
}
}
4 changes: 2 additions & 2 deletions Modules/CodeTrek/Entities/CodeTrekApplicant.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Operations\Entities\OfficeLocation;
use Modules\CodeTrek\Database\Factories\CodeTrekApplicantFactory;
use Modules\User\Entities\User;


class CodeTrekApplicant extends Model
{
use SoftDeletes;
use SoftDeletes, HasFactory;
protected $guarded = [];
public function roundDetails()
{
Expand Down

0 comments on commit f10671c

Please sign in to comment.