Add notifications column to incidents (WIP)
This commit is contained in:
@@ -69,19 +69,30 @@ class Incident extends Model implements HasPresenter
|
||||
'is_resolved',
|
||||
];
|
||||
|
||||
/**
|
||||
* The model's attributes.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $attributes = [
|
||||
'stickied' => false,
|
||||
'notifications' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $casts = [
|
||||
'component_id'=> 'int',
|
||||
'status' => 'int',
|
||||
'user_id' => 'int',
|
||||
'visible' => 'int',
|
||||
'stickied' => 'bool',
|
||||
'occurred_at' => 'datetime',
|
||||
'deleted_at' => 'date',
|
||||
'component_id' => 'int',
|
||||
'status' => 'int',
|
||||
'user_id' => 'int',
|
||||
'visible' => 'int',
|
||||
'stickied' => 'bool',
|
||||
'notifications' => 'bool',
|
||||
'occurred_at' => 'datetime',
|
||||
'deleted_at' => 'date',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -96,6 +107,7 @@ class Incident extends Model implements HasPresenter
|
||||
'status',
|
||||
'visible',
|
||||
'stickied',
|
||||
'notifications',
|
||||
'message',
|
||||
'occurred_at',
|
||||
'created_at',
|
||||
@@ -108,13 +120,14 @@ class Incident extends Model implements HasPresenter
|
||||
* @var string[]
|
||||
*/
|
||||
public $rules = [
|
||||
'user_id' => 'required|int',
|
||||
'component_id' => 'nullable|int',
|
||||
'name' => 'required|string',
|
||||
'status' => 'required|int',
|
||||
'visible' => 'required|bool',
|
||||
'stickied' => 'required|bool',
|
||||
'message' => 'required|string',
|
||||
'user_id' => 'required|int',
|
||||
'component_id' => 'nullable|int',
|
||||
'name' => 'required|string',
|
||||
'status' => 'required|int',
|
||||
'visible' => 'required|bool',
|
||||
'stickied' => 'required|bool',
|
||||
'notifications' => 'nullable|bool',
|
||||
'message' => 'required|string',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user