feat(timetable): Artist domain — 7 enums + 9 Eloquent models
Enums under App\Enums\Artist\ (PascalCase per FormBuilder convention, snake_case wire values per RFC): - ArtistEngagementStatus (D9, 9 states + Dutch labels) - BumaHandledBy (D26) - FeeType, PaymentStatus - AdvanceSectionType, AdvanceSectionSubmissionStatus, AdvanceSubmissionStatus Models: - Artist (org-scoped, slug-unique-per-org via creating boot hook) - ArtistEngagement (per-event booking, denorm organisation_id) - Genre, Stage (event-scoped, ordered scope), StageDay (Pivot, int PK) - Performance (engagement-scoped, isParked() helper) - AdvanceSection, AdvanceSubmission, ArtistContact (primary scope) OrganisationScope wired: - Direct organisation_id: Artist, Genre, ArtistEngagement - FK-chain via tenantScopeStrategy(): Stage→Event, Performance→Engagement, AdvanceSection→Engagement, AdvanceSubmission→Section→Engagement, ArtistContact→Artist, StageDay→Stage→Event Soft-deletes: Artist, ArtistEngagement, Performance (per RFC §5.4). LogsActivity baseline (logFillable+dontSubmitEmptyLogs) on all business models — actual mutation surfaces wire LogOptions in Session 2+. Inverse relations added on Organisation, Event, Company. companies.handles_buma cast added. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ final class Company extends Model
|
||||
'organisation_id',
|
||||
'name',
|
||||
'type',
|
||||
'handles_buma',
|
||||
'kvk_number',
|
||||
'contact_first_name',
|
||||
'contact_last_name',
|
||||
@@ -35,6 +36,13 @@ final class Company extends Model
|
||||
'contact_phone',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'handles_buma' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function getContactFullNameAttribute(): ?string
|
||||
{
|
||||
if (! $this->contact_first_name) {
|
||||
@@ -54,6 +62,11 @@ final class Company extends Model
|
||||
return $this->hasMany(Person::class);
|
||||
}
|
||||
|
||||
public function artistsAsAgent(): HasMany
|
||||
{
|
||||
return $this->hasMany(Artist::class, 'agent_company_id');
|
||||
}
|
||||
|
||||
/** @param Builder<self> $query */
|
||||
public function scopeOrdered(Builder $query): Builder
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user