<?php

namespace Mehrab\Payment\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Mehrab\Media\Models\Media;
use Mehrab\Region\Models\Region;
use Mehrab\User\Models\User;

class Settlement extends Model
{
    use HasFactory;


    const STATUS_PENDING = 'pending';
    const STATUS_SETTLED = 'settled';
    const STATUS_REJECTED = 'rejected';
    const STATUS_CANCELED = 'canceled';
    public static $status = [
        self::STATUS_PENDING,
        self::STATUS_CANCELED,
        self::STATUS_SETTLED,
        self::STATUS_REJECTED,
    ];


    protected $guarded = [];

    protected $casts = [
        'to' => 'json',
        'from' => 'json',
        'reports' => 'json',
    ];

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



}
