'integer', 'profit_commission_profile_id' => 'integer', 'live_rate' => 'decimal:4', 'slot_rate' => 'decimal:4', 'lottery_rate' => 'decimal:4', 'sport_rate' => 'decimal:4', 'esports_rate' => 'decimal:4', 'fishing_rate' => 'decimal:4', 'chess_rate' => 'decimal:4', 'effective_from' => 'date', 'created_by' => 'integer', ]; public function agent() { return $this->belongsTo(Agent::class); } public function profile() { return $this->belongsTo(AgentProfitCommissionProfile::class, 'profit_commission_profile_id'); } public function rateForGameType(int $gameType): string { $field = AgentProfitCommissionProfile::GAME_TYPE_RATE_FIELDS[$gameType] ?? null; return $field ? (string) $this->{$field} : '0.0000'; } }