<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class ActiveNumber extends Model
{
    protected $fillable = [
        'user_id', 'number_id', 'number', 'server_id', 'service_id', 'order_id',
        'buy_time', 'service_price', 'service_name', 'status', 'sms_text', 'active_status'
    ];

    protected $casts = ['buy_time' => 'datetime'];

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