@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Investor;
|
||||
use App\Models\Project;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class InvestMozReferenceSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
if (! app()->environment(['local', 'testing'])) {
|
||||
throw new \RuntimeException('Reference fixtures are restricted to local/testing.');
|
||||
}
|
||||
|
||||
Project::withTrashed()->updateOrCreate(
|
||||
['source_system' => 'example', 'external_id' => 'PROJECT-001'],
|
||||
[
|
||||
'code' => 'EXAMPLE-PROJECT-001',
|
||||
'name' => 'Projecto fictício para validação técnica',
|
||||
'status' => 'draft',
|
||||
'budget_amount' => '1000.00',
|
||||
'budget_currency' => 'MZN',
|
||||
'data_classification' => 'internal',
|
||||
'deleted_at' => null,
|
||||
],
|
||||
);
|
||||
Investor::withTrashed()->updateOrCreate(
|
||||
['source_system' => 'example', 'external_id' => 'INVESTOR-001'],
|
||||
[
|
||||
'legal_name' => 'Entidade fictícia para validação técnica',
|
||||
'investor_type' => 'institutional',
|
||||
'status' => 'prospect',
|
||||
'data_classification' => 'internal',
|
||||
'deleted_at' => null,
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user