first commit
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-09-28 10:01:09 +02:00
commit 250ac35fd1
481 changed files with 92144 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
class AiRun extends Model
{
use HasUuids;
protected $guarded = ['id'];
protected $casts = ['result' => 'encrypted:array', 'source_ids' => 'array', 'review_requested' => 'boolean'];
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class ClusterProject extends DomainRecord {}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class Contact extends CrmRecord {}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class Course extends DomainRecord {}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace App\Models;
/** @property string $id */
abstract class CrmRecord extends DomainRecord {}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace App\Models;
/** @property string|null $lead_id */
class CrmTask extends CrmRecord
{
protected $table = 'tasks';
protected $casts = ['due_at' => 'immutable_datetime'];
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class DevelopmentCorridor extends DomainRecord {}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
/** @property string $id */
abstract class DomainRecord extends Model
{
use HasUuids, SoftDeletes;
protected $guarded = ['id'];
protected $keyType = 'string';
public $incrementing = false;
public function newUniqueId(): string
{
return (string) Str::uuid();
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class EconomicCluster extends DomainRecord {}
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class EducationInvestmentProposal extends DomainRecord {}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class InterestRequest extends Model
{
use SoftDeletes;
protected $fillable = [
'opportunity_id', 'reference', 'full_name', 'email', 'phone',
'investor_type', 'country', 'sector_interest',
'opportunity_reference', 'investment_range', 'message',
'privacy_consent', 'consented_at', 'status', 'source_page',
'ip_address', 'user_agent', 'metadata', 'reviewed_at', 'reviewed_by',
];
protected $casts = [
'privacy_consent' => 'boolean',
'consented_at' => 'datetime',
'metadata' => 'array',
'reviewed_at' => 'datetime',
];
/** @return BelongsTo<Opportunity, $this> */
public function opportunity(): BelongsTo
{
return $this->belongsTo(Opportunity::class);
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace App\Models;
/**
* @property string $title
* @property array<string, string> $content
* @property string|null $project_id
* @property string|null $cluster_id
* @property string|null $corridor_id
* @property int|null $editor_id
*/
class InvestmentDossier extends DomainRecord
{
protected $casts = ['content' => 'array', 'version_no' => 'integer'];
}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace App\Models;
/** @property string $cluster_id */
class InvestmentGap extends DomainRecord {}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
class InvestmentItem extends Model
{
use HasUuids;
protected $guarded = ['id'];
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
class InvestmentLegalSource extends Model
{
use HasUuids;
protected $guarded = ['id'];
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class InvestmentSpecificNeed extends Model
{
protected $guarded = ['id'];
protected function casts(): array
{
return ['details' => 'encrypted:array'];
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
class InvestmentSubmission extends Model
{
use HasUuids;
protected $guarded = ['id'];
protected function casts(): array
{
return ['payload' => 'encrypted:array', 'version' => 'integer'];
}
}
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace App\Models;
class InvestmentZone extends DomainRecord
{
protected $casts = ['version_no' => 'integer', 'published_at' => 'datetime'];
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Database\Factories\InvestorFactory;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
class Investor extends Model
{
/** @use HasFactory<InvestorFactory> */
use HasFactory;
use HasUuids, SoftDeletes;
protected $table = 'investors';
protected $guarded = ['id'];
public function newUniqueId(): string
{
// Keep application-generated identifiers aligned with gen_random_uuid().
return (string) Str::uuid();
}
/** @return array<string, string> */
protected function casts(): array
{
return [
'version_no' => 'integer',
'created_at' => 'immutable_datetime',
'updated_at' => 'immutable_datetime',
'deleted_at' => 'immutable_datetime',
];
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace App\Models;
/**
* @property string $dossier_id
* @property string|null $origin_dossier_id
* @property int|null $interest_request_id
* @property string $status
*/
class InvestorJourney extends DomainRecord {}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class LabourDemand extends DomainRecord {}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property string|null $investor_id
* @property string $status
*/
class Lead extends CrmRecord
{
protected $table = 'leads';
protected $casts = ['estimated_amount' => 'decimal:2'];
/** @return BelongsTo<Investor, $this> */
public function investor(): BelongsTo
{
return $this->belongsTo(Investor::class);
}
/** @return BelongsTo<User, $this> */
public function owner(): BelongsTo
{
return $this->belongsTo(User::class, 'owner_user_id');
}
/** @return HasMany<CrmTask, $this> */
public function tasks(): HasMany
{
return $this->hasMany(CrmTask::class);
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class Occupation extends DomainRecord {}
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class Opportunity extends Model
{
use SoftDeletes;
protected $fillable = [
'sector_id', 'reference', 'title', 'slug', 'summary', 'description',
'province', 'district', 'promoter_name', 'promoter_type',
'maturity_level', 'maturity_label', 'estimated_investment_amount',
'estimated_investment_currency', 'financing_modality',
'expected_impact', 'status', 'is_featured', 'published_at',
'last_validated_at',
];
protected $casts = [
'is_featured' => 'boolean',
'published_at' => 'datetime',
'last_validated_at' => 'datetime',
'estimated_investment_amount' => 'decimal:2',
];
/** @return BelongsTo<Sector, $this> */
public function sector(): BelongsTo
{
return $this->belongsTo(Sector::class);
}
/** @param Builder<Opportunity> $query
* @return Builder<Opportunity>
*/
public function scopePublished(Builder $query): Builder
{
return $query->where('status', 'published')->whereNotNull('published_at')->where('published_at', '<=', now());
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Models;
use Database\Factories\ProjectFactory;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
/** @property string $id */
class Project extends Model
{
/** @use HasFactory<ProjectFactory> */
use HasFactory;
use HasUuids, SoftDeletes;
protected $table = 'projects';
protected $guarded = ['id'];
public function newUniqueId(): string
{
// Keep application-generated identifiers aligned with gen_random_uuid().
return (string) Str::uuid();
}
/** @return array<string, string> */
protected function casts(): array
{
return [
'version_no' => 'integer',
'created_at' => 'immutable_datetime',
'updated_at' => 'immutable_datetime',
'deleted_at' => 'immutable_datetime',
'budget_amount' => 'decimal:2',
'metadata' => 'array',
'start_date' => 'immutable_date',
'end_date' => 'immutable_date',
];
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
class Sector extends Model
{
use SoftDeletes;
protected $fillable = [
'name', 'slug', 'short_description', 'description',
'icon', 'sort_order', 'is_active', 'published_at',
];
protected $casts = [
'is_active' => 'boolean',
'published_at' => 'datetime',
];
/** @return HasMany<Opportunity, $this> */
public function opportunities(): HasMany
{
return $this->hasMany(Opportunity::class);
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class Skill extends DomainRecord {}
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace App\Models;
class TrainingCapacity extends DomainRecord
{
protected $table = 'training_capacities';
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace App\Models;
class TrainingProvider extends DomainRecord {}
+52
View File
@@ -0,0 +1,52 @@
<?php
namespace App\Models;
use Database\Factories\UserFactory;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Carbon;
use Laravel\Fortify\Contracts\PasskeyUser;
use Laravel\Fortify\PasskeyAuthenticatable;
use Laravel\Fortify\TwoFactorAuthenticatable;
/**
* @property int $id
* @property string $name
* @property string $email
* @property Carbon|null $email_verified_at
* @property string $password
* @property string|null $two_factor_secret
* @property string|null $two_factor_recovery_codes
* @property Carbon|null $two_factor_confirmed_at
* @property string|null $remember_token
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*/
#[Fillable(['name', 'email', 'password'])]
#[Hidden(['password', 'two_factor_secret', 'two_factor_recovery_codes', 'remember_token'])]
class User extends Authenticatable implements MustVerifyEmail, PasskeyUser
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable, PasskeyAuthenticatable, TwoFactorAuthenticatable;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
/* @chisel-2fa */
'two_factor_confirmed_at' => 'datetime',
/* @end-chisel-2fa */
];
}
}
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace App\Models;
/** @property string $cluster_id */
class ValueChain extends DomainRecord {}
+9
View File
@@ -0,0 +1,9 @@
<?php
namespace App\Models;
/**
* @property string $from_value_chain_id
* @property string $to_value_chain_id
*/
class ValueChainLink extends DomainRecord {}