<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Commission extends Model
{
    protected $fillable = [
        'reseller_profile_id',
        'transaction_id',
        'amount',
        'payout_type',
        'status',
    ];

    protected $casts = [
        'amount' => 'decimal:2',
    ];

    public function reseller()
    {
        return $this->belongsTo(ResellerProfile::class, 'reseller_profile_id');
    }

    public function transaction()
    {
        return $this->belongsTo(Transaction::class);
    }
}
