<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;

class Coupon extends Model
{
    protected $fillable = ['user_id', 'code', 'off', 'status', 'expire_at'];

    protected $dates = ['expire_at'];

    public function isExpired()
    {
        return $this->expire_at && $this->expire_at->isPast();
    }
}
