Files
Investidor-V2/app/Models/Investor.php
T
nala 4f35313d06
tests / ci (push) Canceled after 0s
novas funcionalidades dos formulario
2026-10-02 11:13:37 +02:00

45 lines
1.2 KiB
PHP

<?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',
'investment_sectors' => 'array',
'investment_geographies' => 'array',
'investment_horizon_months' => 'integer',
'ticket_min' => 'decimal:2',
'ticket_max' => 'decimal:2',
];
}
}