<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class EmailMessageRecipient extends Model
{
    protected $fillable = [
        'email_message_id',
        'member_id',
        'email_address',
        'status',
        'error_message',
        'sent_at'
    ];

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

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