22 خطوط
543 B
PHP
22 خطوط
543 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class LeadStatus extends Model
|
|
{
|
|
protected $fillable = ['name', 'slug', 'color', 'icon', 'sort_order', 'is_active', 'is_default', 'is_won', 'is_lost'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['is_active' => 'boolean', 'is_default' => 'boolean', 'is_won' => 'boolean', 'is_lost' => 'boolean'];
|
|
}
|
|
|
|
public function leads(): HasMany
|
|
{
|
|
return $this->hasMany(Lead::class);
|
|
}
|
|
}
|