Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 3 |
| Shift | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 3 |
| weekend | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| userShifts | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| shiftBuffer | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App\Models\Admin; | |
| use Illuminate\Database\Eloquent\Model; | |
| use OwenIt\Auditing\Contracts\Auditable; | |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| class Shift extends Model implements Auditable | |
| { | |
| use \OwenIt\Auditing\Auditable; | |
| use SoftDeletes; | |
| protected $dates = ['deleted_at']; | |
| protected $fillable = ['shift','start_time','end_time','buffer_on_checkin','buffer_on_checkout']; | |
| public function weekend() | |
| { | |
| return $this->hasone(Weekend::class); | |
| } | |
| public function userShifts() | |
| { | |
| return $this->belongsToMany(UserDetail::class); | |
| } | |
| public function shiftBuffer() | |
| { | |
| return $this->belongsTo(BufferOn::class,'buffer_on_id','id'); | |
| // return $this->belongsTo(BufferOn::class,'bufferOn_id','id'); | |
| } | |
| } |