1 | <?php |
||
9 | class SensorData extends Model |
||
10 | { |
||
11 | use LogsActivity; |
||
12 | |||
13 | protected $table = 'sensor_data'; |
||
14 | |||
15 | /** |
||
16 | * Update the updated_at and created_at timestamps? |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | public $timestamps = true; |
||
21 | |||
22 | /** |
||
23 | * The attributes that are mass assignable. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $fillable = array('sensor_id', 'value'); |
||
28 | |||
29 | /** |
||
30 | * The attributes that are visible. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $visible = array('id', 'sensor_id', 'value', 'created_at', 'updated_at'); |
||
35 | |||
36 | /** |
||
37 | * The attributes to log in the Activity Log |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected static $logAttributes = array('id', 'sensor_id', 'value', 'created_at', 'updated_at'); |
||
42 | |||
43 | /** |
||
44 | * Only log those that have actually changed after the update. |
||
45 | * |
||
46 | * @var array |
||
47 | */ |
||
48 | protected static $logOnlyDirty = true; |
||
49 | |||
50 | /** |
||
51 | * Get the device associated with the sensor. |
||
52 | */ |
||
53 | public function sensor() |
||
57 | } |