<?php

namespace App\Models;

use Database\Factories\CouponFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Coupon extends Model
{
    /** @use HasFactory<CouponFactory> */
    use HasFactory;

    protected $fillable = ['phone', 'code'];

    public function phoneVerification(): HasOne
    {
        return $this->hasOne(PhoneVerification::class, 'phone', 'phone');
    }
}
