38 lines
1018 B
PHP
38 lines
1018 B
PHP
<?php
|
|
|
|
namespace Modules\Crm\Entities;
|
|
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class CrmOfferCatalog extends Model
|
|
{
|
|
protected $table = 'crm_offer_catalog';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'target_industries' => 'array',
|
|
'required_signals' => 'array',
|
|
'is_active' => 'boolean',
|
|
];
|
|
|
|
public static function offerTypes(): array
|
|
{
|
|
return [
|
|
'training' => __('crm::lang.offer_training'),
|
|
'technical_service' => __('crm::lang.offer_technical_service'),
|
|
'warranty_extension' => __('crm::lang.offer_warranty'),
|
|
'repair_insurance' => __('crm::lang.offer_repair_insurance'),
|
|
'spare_parts' => __('crm::lang.offer_spare_parts'),
|
|
'consulting' => __('crm::lang.offer_consulting'),
|
|
'partnership' => __('crm::lang.offer_partnership'),
|
|
];
|
|
}
|
|
|
|
public function createdBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by');
|
|
}
|
|
}
|