<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CorporateContact extends Model
{
    protected $fillable = [
        'tenant_id',
        'company_id',
        'name',
        'designation',
        'department',
        'mobile',
        'whatsapp',
        'email',
        'authorization_level',
        'is_primary',
    ];

    protected $casts = [
        'is_primary' => 'boolean',
    ];

    public function company()
    {
        return $this->belongsTo(CorporateCompany::class, 'company_id');
    }
}
