<?php

namespace App\Models;

use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class CustomerContact extends Model
{
    use BelongsToTenant;

    protected $fillable = [
        'tenant_id',
        'customer_id',
        'primary_mobile',
        'normalized_mobile',
        'whatsapp_number',
        'email',
        'preferred_channel',
        'marketing_consent',
        'notification_consent',
    ];

    protected $casts = [
        'marketing_consent' => 'boolean',
        'notification_consent' => 'boolean',
    ];

    public function customer()
    {
        return $this->belongsTo(Customer::class);
    }
}
