blob: defcb144cc89d4df1283f3894c184611b74cd12e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
namespace Database\Factories;
use App\Models\Group;
use App\Models\Student;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Student>
*/
class StudentFactory extends Factory
{
protected $model = Student::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->firstName(),
'last_name' => fake()->lastName(),
'age' => fake()->numberBetween(5, 18),
'group_id' => Group::factory(),
'sub_group_id' => null,
'points' => fake()->numberBetween(0, 100),
'enrollment_date' => fake()->dateTimeBetween('-1 year', 'now'),
];
}
}
|