feat: add date_of_birth field to persons across all layers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 09:06:29 +02:00
parent d2f282eb4c
commit 6dccf87234
18 changed files with 161 additions and 17 deletions

View File

@@ -20,6 +20,7 @@ final class StorePersonRequest extends FormRequest
'crowd_type_id' => ['required', 'ulid', 'exists:crowd_types,id'],
'first_name' => ['required', 'string', 'max:255'],
'last_name' => ['required', 'string', 'max:255'],
'date_of_birth' => ['nullable', 'date', 'before:today'],
'email' => ['required', 'email', 'max:255'],
'phone' => ['nullable', 'string', 'max:30'],
'company_id' => ['nullable', 'ulid', 'exists:companies,id'],

View File

@@ -20,6 +20,7 @@ final class UpdatePersonRequest extends FormRequest
'crowd_type_id' => ['sometimes', 'ulid', 'exists:crowd_types,id'],
'first_name' => ['sometimes', 'string', 'max:255'],
'last_name' => ['sometimes', 'string', 'max:255'],
'date_of_birth' => ['nullable', 'date', 'before:today'],
'email' => ['sometimes', 'email', 'max:255'],
'phone' => ['nullable', 'string', 'max:30'],
'company_id' => ['nullable', 'ulid', 'exists:companies,id'],

View File

@@ -35,6 +35,7 @@ final class VolunteerRegistrationRequest extends FormRequest
'last_name' => ['required_without:_authenticated', 'string', 'max:255'],
'email' => ['required_without:_authenticated', 'email', 'max:255'],
'phone' => ['nullable', 'string', 'max:50'],
'date_of_birth' => ['nullable', 'date', 'before:today'],
'tshirt_size' => ['nullable', 'string', 'in:XS,S,M,L,XL,XXL,XXXL'],
'first_aid' => ['nullable', 'boolean'],

View File

@@ -16,6 +16,7 @@ final class PersonResource extends JsonResource
'event_id' => $this->event_id,
'first_name' => $this->first_name,
'last_name' => $this->last_name,
'date_of_birth' => $this->date_of_birth?->toDateString(),
'full_name' => $this->full_name,
'email' => $this->email,
'phone' => $this->phone,