<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SmsMessageRecipient extends Model
{
    protected $fillable = [
        'sms_message_id',
        'member_id',
        'phone',
        'status',
        'error_message',
        'sent_at'
    ];

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

    public function message()
    {
        return $this->belongsTo(SmsMessage::class);
    }
    public function member()
    {
        return $this->belongsTo(Member::class);
    }
}
