<?php

namespace Modules\PaymentLog\Models;

use Modules\Canteen\Models\Canteen;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\Order\Models\Order;
use Modules\Subscription\Models\Subscription;
use Modules\User\Models\User;

class PaymentLog extends Model
{
    //use soft delete
    use SoftDeletes;

    protected $fillable = [
        'acc_status',
        'status',
        'price',
        'description',
        'canteen_id',
        'order_id',
        'user_id'
    ];

    public function user()
    {
        return $this->belongsTo(User::class)->withTrashed();
    }
    public function canteen()
    {
        return $this->belongsTo(Canteen::class)->withTrashed();
    }
    public function order()
    {
        return $this->belongsTo(Order::class)->withTrashed();
    }
    public function subscription()
    {
        return $this->belongsTo(Subscription::class)->withTrashed();
    }
}
