40 lines
975 B
PHP
40 lines
975 B
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',
|
|
];
|
|
}
|
|
}
|