CRM/backend/app/Models/CallResult.php

37 خطوط
908 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CallResult extends Model
{
protected $fillable = [
'name', 'slug', 'color', 'requires_follow_up', 'is_positive',
'is_negative', 'is_final', 'next_pipeline_stage_id', 'lead_status_id',
'phone_status', 'next_action', 'sort_order', 'is_active',
];
protected function casts(): array
{
return [
'requires_follow_up' => 'boolean',
'is_positive' => 'boolean',
'is_negative' => 'boolean',
'is_final' => 'boolean',
'is_active' => 'boolean',
'sort_order' => 'integer',
];
}
public function nextPipelineStage()
{
return $this->belongsTo(PipelineStage::class, 'next_pipeline_stage_id');
}
public function leadStatus()
{
return $this->belongsTo(LeadStatus::class);
}
}