Files
Investidor-V2/database/seeders/InvestMozReferenceSeeder.php
nala 250ac35fd1
tests / ci (push) Canceled after 0s
first commit
2026-09-28 10:01:09 +02:00

41 lines
1.3 KiB
PHP

<?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,
],
);
}
}