feat(organisation): add contact fields to model and API

Add contact_name, contact_email, phone, website columns. Wire the new
fields through the Organisation model, update request validation,
response resource, and the TypeScript Organisation interface. Needed by
the upcoming dashboard + form-builder binding registry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 10:26:44 +02:00
parent 2d86fcbf7e
commit b79ebf5550
6 changed files with 108 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ final class UpdateOrganisationRequest extends FormRequest
'sometimes', 'string', 'max:255', 'regex:/^[a-z0-9-]+$/',
Rule::unique('organisations', 'slug')->ignore($this->route('organisation')),
],
'contact_name' => ['sometimes', 'nullable', 'string', 'max:255'],
'contact_email' => ['sometimes', 'nullable', 'email', 'max:255'],
'phone' => ['sometimes', 'nullable', 'string', 'max:255'],
'website' => ['sometimes', 'nullable', 'url', 'max:255'],
'settings' => ['sometimes', 'array'],
'email_logo_url' => ['nullable', 'url', 'max:500'],
'email_primary_color' => ['nullable', 'string', 'regex:/^#[0-9A-Fa-f]{6}$/'],

View File

@@ -15,6 +15,10 @@ final class OrganisationResource extends JsonResource
'id' => $this->id,
'name' => $this->name,
'slug' => $this->slug,
'contact_name' => $this->contact_name,
'contact_email' => $this->contact_email,
'phone' => $this->phone,
'website' => $this->website,
'billing_status' => $this->billing_status,
'settings' => $this->settings,
'email_logo_url' => $this->email_logo_url,

View File

@@ -21,6 +21,10 @@ final class Organisation extends Model
protected $fillable = [
'name',
'slug',
'contact_name',
'contact_email',
'phone',
'website',
'billing_status',
'settings',
'email_logo_url',