<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class AgentAFAPricing extends Model
{
    protected $table = 'agent_afa_pricing';

    protected $fillable = [
        'user_id',
        'package_id',
        'price',
        'status'
    ];

    protected $casts = [
        'status' => 'boolean',
        'price' => 'decimal:2'
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function package()
    {
        return $this->belongsTo(AFAPackage::class, 'package_id');
    }
}
