<?php

namespace App\Models;

use App\Enums\DepositStatusEnum;
use Illuminate\Database\Eloquent\Model;

class Deposit extends Model
{
    protected $table = 'deposits';

    protected $fillable = [
        'user_id',
        'payment_id',
        'track',
        'amount',
        'coins',
        'currency',
        'charge',
        'status',
    ];

    protected $casts = [
        'status' => DepositStatusEnum::class,
    ];

    public function payment()
    {
        return $this->belongsTo(Payment::class);
    }

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