Files
Caramel-CRM/app/Models/PipelineItem.php
T

51 lines
943 B
PHP
Raw Normal View History

2026-02-17 10:35:03 +01:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PipelineItem extends Model
{
use HasFactory;
protected $table = 'pipeline_items';
protected $fillable = [
'pipeline_lane_id',
'title',
'position',
'expected_revenue',
'due_date',
'description'
];
protected $casts = [
'next_action' => 'date',
'expected_revenue' => 'decimal:2',
'actions' => 'integer',
'position' => 'integer',
];
public function pipelineLane()
{
return $this->belongsTo(PipelineLane::class);
}
/**
* Get the notes
*/
public function notes()
{
return $this->morphMany(Note::class, 'notable');
}
/**
* Get the todos
*/
public function todos()
{
return $this->morphMany(Todo::class, 'todoable');
}
2026-02-17 10:35:03 +01:00
}