<?php

namespace Modules\Subscription\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\Coupon\Models\Coupon;
use Modules\Package\Models\Package;
use Modules\Product\Models\Product;
use Modules\User\Enums\AccountStatusEnum;
use Modules\User\Models\User;
use Modules\User\Models\Visitor;

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

    protected $fillable = [
        'points',
        'total',
        'remain_points',
        'package_id',
        'user_id'
    ];


    /**
     * Get current description of the the Room
     * @return HasOne
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class, 'user_id')->withTrashed();
    }

    public function package()
    {
        return $this->belongsTo(Package::class, )->withTrashed();
    }

}
