Two month of work
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user