1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/app/Models/TaskStatus.php
2019-01-30 22:25:07 +11:00

50 lines
702 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class PaymentTerm.
*/
class TaskStatus extends EntityModel
{
use SoftDeletes;
/**
* @var bool
*/
public $timestamps = true;
/**
* @var array
*/
protected $dates = ['deleted_at'];
/**
* @var array
*/
protected $fillable = [
'name',
'sort_order',
];
/**
* @return mixed
*/
public function getEntityType()
{
return ENTITY_TASK_STATUS;
}
/**
* @return mixed
*/
public function tasks()
{
return $this->hasMany('App\Models\Task')->orderBy('task_status_sort_order');
}
}