Cross-cutting migration affecting the entire stack: - Database: 3 migrations splitting name columns with data migration - Models: first_name/last_name on User, Person; contact_first_name/contact_last_name on Company; backward-compatible name accessors - API: all resources return first_name, last_name, full_name; assignablePersons endpoint updated - Requests: validation rules updated for all person/user/company forms - Services: VolunteerRegistrationService, ShiftAssignmentService, InvitationService updated - Frontend: TypeScript types, Zod schemas, all forms split into Voornaam/Achternaam fields - Display: all person/user name references use full_name; initials use first_name[0]+last_name[0] - Tests: all 371 tests passing - Docs: SCHEMA.md and API.md updated Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
958 B
PHP
41 lines
958 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Organisation;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$this->call(RoleSeeder::class);
|
|
|
|
$admin = User::create([
|
|
'first_name' => 'Super',
|
|
'last_name' => 'Admin',
|
|
'email' => 'admin@crewli.app',
|
|
'password' => Hash::make('password'),
|
|
]);
|
|
|
|
$admin->assignRole('super_admin');
|
|
|
|
$organisation = Organisation::query()->create([
|
|
'name' => 'Demo Organisation',
|
|
'slug' => 'demo',
|
|
'billing_status' => 'active',
|
|
'settings' => [],
|
|
]);
|
|
|
|
$admin->organisations()->attach($organisation->id, ['role' => 'org_admin']);
|
|
|
|
if (app()->environment('local')) {
|
|
$this->call(DevSeeder::class);
|
|
}
|
|
}
|
|
}
|