<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Company extends Model
{
    use SoftDeletes;
    protected $table = 'companies';
    protected $fillable = [
        'id',
        'company_type_id',
        'name',
        'name_en',
        'address',
        'district',
        'sub_province',
        'province',
        'postcode',
        'contry_code',
        'phone',
        'fax',
        'tax',
        'branch',
        'tax_incentive',
        'created_at',
        'updated_at',
    ];

    public function companyType()
    {
        return $this->belongsTo(CompanyType::class, 'company_type_id');
    }

    
    public function groups()
    {
        return $this->hasMany(Group::class);
    }

}
