Files
mykopkb-be/Modules/Investment/Entities/ProfileInvestmentLimit.php
T

40 lines
922 B
PHP

<?php
namespace Modules\Investment\Entities;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ProfileInvestmentLimit extends Model
{
use HasUuids;
protected $table = 'profile_investment_limits';
protected $fillable = [
'profile_id',
'investment_type_id',
'max_investment_amount',
'max_transaction_amount',
];
protected function casts(): array
{
return [
'max_investment_amount' => 'decimal:2',
'max_transaction_amount' => 'decimal:2',
];
}
public function profile(): BelongsTo
{
return $this->belongsTo(InvestmentLimitProfile::class, 'profile_id');
}
public function investmentType(): BelongsTo
{
return $this->belongsTo(InvestmentType::class, 'investment_type_id');
}
}