#27 - separate fields for name and surname (#29)

* #27 - separate fields for name and surname

* #27 -cr fix
This commit is contained in:
Adrian Hopek
2022-01-24 12:40:56 +01:00
committed by GitHub
parent e147d24365
commit 6854c7a9f8
17 changed files with 127 additions and 48 deletions

View File

@@ -13,7 +13,8 @@ class UserFactory extends Factory
public function definition(): array
{
return [
"name" => "{$this->faker->firstName} {$this->faker->lastName}",
"first_name" => $this->faker->firstName(),
"last_name" => $this->faker->lastName(),
"email" => $this->faker->unique()->safeEmail(),
"employment_form" => $this->faker->randomElement(EmploymentForm::cases()),
"employment_date" => $this->faker->dateTimeBetween("2020-10-27"),

View File

@@ -17,7 +17,6 @@ class VacationLimitFactory extends Factory
return [
"user_id" => User::factory(),
"year_period_id" => YearPeriod::factory(),
"has_vacation" => $hasVacation,
"days" => $hasVacation ? $this->faker->numberBetween(20, 26) : null,
];
}

View File

@@ -11,7 +11,8 @@ return new class() extends Migration {
{
Schema::create("users", function (Blueprint $table): void {
$table->id();
$table->string("name");
$table->string("first_name");
$table->string("last_name");
$table->string("email")->unique();
$table->string("avatar")->nullable();
$table->string("employment_form");