34 lines
942 B
PHP
34 lines
942 B
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',
|
|
];
|
|
|
|
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);
|
|
}
|
|
}
|