<?php

namespace App\Models\Defendant;

use App\Casts\EmailAddress;
use App\Casts\PhoneNumber;
use App\Trait\HasAddress;
use Illuminate\Database\Eloquent\Model;

class DefendantContact extends Model {
    protected $table = 'defendant_contacts';
    protected $fillable = [
        'display_name',
        'email_address',
        'line_1',
        'line_2',
        'line_3',
        'postcode',
        'phone_number',
    ];

    protected $casts = [
        'email_address' => EmailAddress::class,
        'phone_number' => PhoneNumber::class,
    ];

    use HasAddress;
}
