State: Add native is_overdue column

This commit is contained in:
Johannes Meyer 2019-12-04 13:44:09 +01:00
parent f0aa99064f
commit 7958eda837

View file

@ -13,8 +13,6 @@ use ipl\Orm\Model;
*/
abstract class State extends Model
{
protected $accessorsAndMutatorsEnabled = true;
public function getColumns()
{
return [
@ -33,6 +31,7 @@ abstract class State extends Model
'is_handled',
'is_reachable',
'is_flapping',
'is_overdue',
'is_acknowledged',
'acknowledgement_comment_id',
'in_downtime',
@ -55,6 +54,7 @@ abstract class State extends Model
'is_handled',
'is_reachable',
'is_flapping',
'is_overdue',
'is_acknowledged',
'in_downtime'
]));
@ -67,9 +67,4 @@ abstract class State extends Model
'next_update'
]));
}
public function mutateIsOverdueProperty()
{
return $this->properties['next_update'] < time();
}
}