90 lines
1.8 KiB
PHP
90 lines
1.8 KiB
PHP
<?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
|
|
* @property int $qr_code
|
|
* @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',
|
|
'qr_code',
|
|
'date_created',
|
|
'open_hours',
|
|
'close_hours',
|
|
'town_id',
|
|
'number_super',
|
|
'number_geoBysuper'
|
|
];
|
|
|
|
public function town()
|
|
{
|
|
return $this->belongsTo(Town::class);
|
|
}
|
|
}
|