<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CompanyMember extends Model
{
    use HasFactory;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'company_id',
        'position',
        'title',
        'name_english',
        'name_chinese',
        'phone',
        'email',
        'document_type',
        'document_number',
        'country',
        'address_english',
        'address_chinese',
        'year_date',
        'month_date',
        'day_date',
    ];

    public function documents()
    {
        return $this->hasMany(CompanyDocument::class, 'member_id', 'id');
    }
}
