varias alteracoes
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-06 14:50:12 +02:00
parent 4f35313d06
commit e65cb26901
333 changed files with 54656 additions and 2058 deletions
+1
View File
@@ -2,4 +2,5 @@
namespace App\Models;
/** @property int $version_no */
class ClusterProject extends DomainRecord {}
+14
View File
@@ -2,9 +2,23 @@
namespace App\Models;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property string|null $public_slug
* @property string|null $public_title
* @property string|null $activity_code
* @property string|null $stage
* @property string|null $objective
* @property string|null $currency
* @property string|null $amount_min
* @property string|null $amount_max
* @property string|null $available_percentage
* @property CarbonImmutable|null $published_at
* @property-read Sector|null $sector
*/
class ExistingBusiness extends DomainRecord
{
protected $hidden = ['payload'];
+6
View File
@@ -5,6 +5,12 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $version_no
* @property string $validation_status
* @property string $valid_from
* @property string|null $valid_until
*/
class InvestmentLegalSource extends Model
{
use HasUuids;
+18 -1
View File
@@ -2,7 +2,24 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class InvestmentZone extends DomainRecord
{
protected $casts = ['version_no' => 'integer', 'published_at' => 'datetime'];
protected $casts = ['version_no' => 'integer', 'published_at' => 'datetime', 'aliases' => 'array', 'activities' => 'array', 'resources' => 'array', 'historical_territory' => 'array', 'area_components' => 'array', 'source_evidence' => 'array', 'area_value' => 'decimal:4', 'data_as_of' => 'date', 'sources_consulted_at' => 'date'];
/** @return BelongsTo<GeoLocation, $this> */
public function primaryTerritory(): BelongsTo
{
return $this->belongsTo(GeoLocation::class, 'primary_territory_id');
}
/** @return BelongsToMany<GeoLocation, $this> */
public function documentedLocations(): BelongsToMany
{
return $this->belongsToMany(GeoLocation::class, 'investment_zone_locations', 'zone_id', 'geo_location_id')
->withPivot(['id', 'scope_type', 'source_reference', 'legal_source_id', 'valid_from', 'valid_until', 'validation_status', 'editor_id', 'reviewer_id', 'version_no'])
->withTimestamps();
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
/**
* @property array<string, mixed> $payload
* @property string $crm_submission_key
* @property int|null $interest_request_id
* @property string $status
* @property string $reference
* @property int $version
*/
class LandAssistanceCase extends Model
{
use HasUuids;
protected $guarded = ['id'];
protected function casts(): array
{
return [
'payload' => 'encrypted:array',
'version' => 'integer',
'support_requested_at' => 'immutable_datetime',
];
}
}
+8
View File
@@ -5,6 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
@@ -23,6 +24,7 @@ class Opportunity extends Model
'expected_impact', 'status', 'is_featured', 'published_at',
'last_validated_at',
'primary_territory_id', 'territory_version',
'geography_scope',
];
protected $casts = [
@@ -45,6 +47,12 @@ class Opportunity extends Model
return $this->belongsTo(GeoLocation::class, 'primary_territory_id');
}
/** @return BelongsToMany<GeoLocation, $this> */
public function additionalTerritories(): BelongsToMany
{
return $this->belongsToMany(GeoLocation::class, 'opportunity_locations', 'opportunity_id', 'geo_location_id');
}
/** @param Builder<Opportunity> $query
* @return Builder<Opportunity>
*/
+4
View File
@@ -5,6 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
/**
* @property string $id
@@ -14,7 +15,10 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property string $status
* @property int $version_no
* @property array<string, mixed> $input_snapshot
* @property array<string, mixed> $calculation_snapshot
* @property array<string, mixed>|null $result_snapshot
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*/
class Simulation extends Model
{
+23 -2
View File
@@ -3,20 +3,41 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Crypt;
/**
* @property string $id
* @property int|null $owner_user_id
* @property string|null $anonymous_token_hash
* @property int $version_no
* @property string $create_key_hash
* @property string $create_payload_hash
* @property string $snapshot_sha256
* @property string $personal_snapshot
* @property string $economic_snapshot
* @property Carbon|null $deleted_at
* @property Carbon|null $expires_at
* @property string|null $claimed_token_hash
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*/
class SimulationFormDraft extends Model
{
public $incrementing = false;
protected $table = 'simulation_form_drafts';
protected $keyType = 'string';
protected $fillable = [
'id', 'owner_user_id', 'anonymous_token_hash', 'version_no', 'create_key_hash', 'create_payload_hash', 'snapshot_sha256',
'personal_snapshot', 'economic_snapshot', 'deleted_at',
'personal_snapshot', 'economic_snapshot', 'deleted_at', 'expires_at', 'claimed_token_hash',
];
protected function casts(): array
{
return ['version_no' => 'integer', 'deleted_at' => 'immutable_datetime'];
return ['version_no' => 'integer', 'deleted_at' => 'immutable_datetime', 'expires_at' => 'immutable_datetime'];
}
/** @param array<string,mixed> $snapshot */
+9
View File
@@ -3,7 +3,16 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* @property string $id
* @property int $version_no
* @property string $status
* @property mixed $report_snapshot
* @property string $report_sha256
* @property Carbon|null $created_at
*/
class SimulationReport extends Model
{
public $incrementing = false;
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* @property string $rule_code
* @property string $component
* @property string $scope_key
* @property string $status
* @property int $author_id
* @property int|null $reviewer_id
* @property int|null $approver_id
* @property Carbon $valid_from
* @property Carbon|null $valid_until
*/
class SimulationTaxRuleVersion extends Model
{
use HasUuids;
protected $guarded = ['id'];
protected function casts(): array
{
return [
'rule_definition' => 'array',
'parameters' => 'array',
'rounding_policy' => 'array',
'valid_from' => 'date:Y-m-d',
'valid_until' => 'date:Y-m-d',
'reviewed_at' => 'immutable_datetime',
'approved_at' => 'immutable_datetime',
'published_at' => 'immutable_datetime',
'suspended_at' => 'immutable_datetime',
'archived_at' => 'immutable_datetime',
];
}
}