| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class RemoteEvent extends Model |
||
| 15 | { |
||
| 16 | use CrudTrait; |
||
|
|
|||
| 17 | use LogsActivity; |
||
| 18 | |||
| 19 | protected $guarded = ['id']; |
||
| 20 | |||
| 21 | protected static bool $logUnguarded = true; |
||
| 22 | |||
| 23 | public function teacher() |
||
| 24 | { |
||
| 25 | return $this->belongsTo(Teacher::class); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function course() |
||
| 29 | { |
||
| 30 | return $this->belongsTo(Course::class); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function period() |
||
| 34 | { |
||
| 35 | return $this->belongsTo(Period::class); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** we store the time volume in seconds */ |
||
| 39 | public function getWorkedHoursAttribute($value) |
||
| 40 | { |
||
| 41 | return $value / 3600; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** we store the time volume in seconds */ |
||
| 45 | public function setWorkedHoursAttribute($value) |
||
| 48 | } |
||
| 49 | } |
||
| 50 |