ultimatepos/Modules/Crm/Entities/CrmCompanyPhone.php

30 lines
745 B
PHP

<?php
namespace Modules\Crm\Entities;
use Illuminate\Database\Eloquent\Model;
class CrmCompanyPhone extends Model
{
protected $table = 'crm_company_phones';
protected $guarded = ['id'];
public static function phoneTypes(): array
{
return [
'main' => __('crm::lang.phone_type_main'),
'sales' => __('crm::lang.phone_type_sales'),
'purchase' => __('crm::lang.phone_type_purchase'),
'fax' => __('crm::lang.phone_type_fax'),
'whatsapp' => __('crm::lang.phone_type_whatsapp'),
'other' => __('crm::lang.phone_type_other'),
];
}
public function company()
{
return $this->belongsTo(CrmCompany::class, 'company_id');
}
}