Files
nala 4f35313d06
tests / ci (push) Canceled after 0s
novas funcionalidades dos formulario
2026-10-02 11:13:37 +02:00

57 lines
1.7 KiB
PHP

<?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', 'existing_business_id', 'investor_id',
'modality', 'requested_percentage', 'ticket_min', 'ticket_max', 'ticket_currency', 'assigned_to', 'next_action', 'next_action_due_at',
];
protected $casts = [
'privacy_consent' => 'boolean',
'consented_at' => 'datetime',
'metadata' => 'array',
'reviewed_at' => 'datetime',
'requested_percentage' => 'decimal:2',
'ticket_min' => 'decimal:2',
'ticket_max' => 'decimal:2',
'next_action_due_at' => 'immutable_datetime',
];
/** @return BelongsTo<Opportunity, $this> */
public function opportunity(): BelongsTo
{
return $this->belongsTo(Opportunity::class);
}
/** @return BelongsTo<ExistingBusiness, $this> */
public function existingBusiness(): BelongsTo
{
return $this->belongsTo(ExistingBusiness::class);
}
/** @return BelongsTo<Investor, $this> */
public function investor(): BelongsTo
{
return $this->belongsTo(Investor::class);
}
/** @return BelongsTo<User, $this> */
public function assignee(): BelongsTo
{
return $this->belongsTo(User::class, 'assigned_to');
}
}