| 
									
										
										
										
											2020-10-27 10:52:37 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Created by Reliese Model. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace App\Models; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use Carbon\Carbon; | 
					
						
							|  |  |  | use Illuminate\Database\Eloquent\Model; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Class Agent | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @property int $id | 
					
						
							|  |  |  |  * @property string $uid | 
					
						
							|  |  |  |  * @property string|null $firstname | 
					
						
							|  |  |  |  * @property string|null $lastname | 
					
						
							|  |  |  |  * @property string|null $email | 
					
						
							|  |  |  |  * @property float|null $longitude | 
					
						
							|  |  |  |  * @property float|null $latitude | 
					
						
							|  |  |  |  * @property string $adresse | 
					
						
							|  |  |  |  * @property float|null $balance | 
					
						
							|  |  |  |  * @property string|null $encrypted_password | 
					
						
							|  |  |  |  * @property string|null $salt | 
					
						
							|  |  |  |  * @property int|null $active | 
					
						
							| 
									
										
										
										
											2022-01-24 11:04:40 +00:00
										 |  |  |  * @property int $qr_code | 
					
						
							| 
									
										
										
										
											2020-10-27 10:52:37 +00:00
										 |  |  |  * @property Carbon|null $date_created | 
					
						
							|  |  |  |  * @property Carbon|null $open_hours | 
					
						
							|  |  |  |  * @property Carbon|null $close_hours | 
					
						
							|  |  |  |  * @property int $town_id | 
					
						
							|  |  |  |  * @property int|null $number_super | 
					
						
							|  |  |  |  * @property int|null $number_geoBysuper | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @property Town $town | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @package App\Models | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | class Agent extends Model | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     protected $table = 'agents'; | 
					
						
							|  |  |  |     public $timestamps = false; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     protected $casts = [ | 
					
						
							|  |  |  |         'longitude' => 'float', | 
					
						
							|  |  |  |         'latitude' => 'float', | 
					
						
							|  |  |  |         'balance' => 'float', | 
					
						
							|  |  |  |         'active' => 'int', | 
					
						
							|  |  |  |         'town_id' => 'int', | 
					
						
							|  |  |  |         'number_super' => 'int', | 
					
						
							|  |  |  |         'number_geoBysuper' => 'int' | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     protected $dates = [ | 
					
						
							|  |  |  |         'date_created', | 
					
						
							|  |  |  |         'open_hours', | 
					
						
							|  |  |  |         'close_hours' | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     protected $hidden = [ | 
					
						
							|  |  |  |         'encrypted_password' | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     protected $fillable = [ | 
					
						
							|  |  |  |         'uid', | 
					
						
							|  |  |  |         'firstname', | 
					
						
							|  |  |  |         'lastname', | 
					
						
							|  |  |  |         'email', | 
					
						
							|  |  |  |         'longitude', | 
					
						
							|  |  |  |         'latitude', | 
					
						
							|  |  |  |         'adresse', | 
					
						
							|  |  |  |         'balance', | 
					
						
							|  |  |  |         'encrypted_password', | 
					
						
							|  |  |  |         'salt', | 
					
						
							|  |  |  |         'active', | 
					
						
							| 
									
										
										
										
											2022-01-24 11:04:40 +00:00
										 |  |  |         'qr_code', | 
					
						
							| 
									
										
										
										
											2020-10-27 10:52:37 +00:00
										 |  |  |         'date_created', | 
					
						
							|  |  |  |         'open_hours', | 
					
						
							|  |  |  |         'close_hours', | 
					
						
							|  |  |  |         'town_id', | 
					
						
							|  |  |  |         'number_super', | 
					
						
							|  |  |  |         'number_geoBysuper' | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     public function town() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return $this->belongsTo(Town::class); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |