'integer', 'profit_commission_profile_id' => 'integer', 'margin_amount' => 'decimal:4', 'f1_lottery_rate' => 'decimal:4', 'f1_sport_rate' => 'decimal:4', 'live_rate' => 'decimal:4', 'slot_rate' => 'decimal:4', 'sport_rate' => 'decimal:4', 'esports_rate' => 'decimal:4', 'fishing_rate' => 'decimal:4', 'chess_rate' => 'decimal:4', 'effective_from' => 'datetime:Y-m-d H:i:s', '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 rateForCategory(string $category): string { return AgentProfitCommissionProfile::rateForCategory($this, $category); } }