mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Test WIP * WIP * port getComponents to Eloquent * port more * simpler creation * change to explicit arrays * add missed file * restore commented code * fix inserting null value for component prefs * Fix some bugs in setCompenentPrefs Can't create tests without fixing bugs first :D * another test * another test * Modernize setComponentPrefs * Test for event log entries * Fix delete event * fix invalid values for component toggles * status log too * Use Setters to work around bad data, $casts doesn't do what we want.
20 lines
407 B
PHP
20 lines
407 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ComponentStatusLog extends Model
|
|
{
|
|
public $timestamps = false;
|
|
protected $table = 'component_statuslog';
|
|
protected $fillable = ['component_id', 'status', 'message'];
|
|
|
|
// ---- Accessors/Mutators ----
|
|
|
|
public function setStatusAttribute($status)
|
|
{
|
|
$this->attributes['status'] = (int)$status;
|
|
}
|
|
}
|