*/ class IncidentUpdate extends Model implements HasPresenter { use SortableTrait, ValidatingTrait; /** * The attributes that should be casted to native types. * * @var string[] */ protected $casts = [ 'incident_id' => 'int', 'status' => 'int', 'message' => 'string', 'user_id' => 'int', ]; /** * The fillable properties. * * @var string[] */ protected $fillable = [ 'incident_id', 'status', 'message', 'user_id', ]; /** * The validation rules. * * @var string[] */ public $rules = [ 'incident_id' => 'required|int', 'status' => 'required|int', 'message' => 'required|string', 'user_id' => 'required|int', ]; /** * The sortable fields. * * @var string[] */ protected $sortable = [ 'id', 'status', 'user_id', ]; /** * Get the incident relation. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function incident() { return $this->belongsTo(Incident::class); } /** * Get the user relation. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() { return $this->belongsTo(User::class); } /** * Get the presenter class. * * @return string */ public function getPresenterClass() { return IncidentUpdatePresenter::class; } }