You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					29 lines
				
				652 B
			
		
		
			
		
	
	
					29 lines
				
				652 B
			| 
								 
											2 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace App\Models;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use Facade\FlareClient\Time\Time;
							 | 
						||
| 
								 | 
							
								use Illuminate\Database\Eloquent\Factories\HasFactory;
							 | 
						||
| 
								 | 
							
								use Illuminate\Database\Eloquent\Model;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class TimeLog extends Model
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    use HasFactory;
							 | 
						||
| 
								 | 
							
								    protected $guarded = ['id'];
							 | 
						||
| 
								 | 
							
								    protected $casts = [
							 | 
						||
| 
								 | 
							
								        'id' => 'integer',
							 | 
						||
| 
								 | 
							
								        'status' => 'integer',
							 | 
						||
| 
								 | 
							
								        'user_id' => 'integer',
							 | 
						||
| 
								 | 
							
								        'shift_id' => 'integer',
							 | 
						||
| 
								 | 
							
								        'working_hour' => 'float',
							 | 
						||
| 
								 | 
							
								    ];
							 | 
						||
| 
								 | 
							
								    public function deliveryman()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return $this->belongsTo(TimeLog::class, 'user_id', 'id');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    public function shift()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return $this->belongsTo(Shift::class, 'shift_id', 'id');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |