52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Magasin extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name', 'address', 'postcode', 'city', 'phone',
|
|
'latitude', 'longitude',
|
|
'gmaps_placeid', 'gmaps_embed_href', 'gmaps_link_href',
|
|
];
|
|
|
|
/**
|
|
* hasMany timeslot settings relation
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function timeslotSettings()
|
|
{
|
|
return $this->hasMany(TimeslotSetting::class);
|
|
}
|
|
|
|
/**
|
|
* hasMany collecte exceptions relation
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function collecteExceptions()
|
|
{
|
|
return $this->hasMany(CollecteException::class);
|
|
}
|
|
|
|
/**
|
|
* hasMany timeslots relation
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function timeslots()
|
|
{
|
|
return $this->hasMany(Timeslot::class);
|
|
}
|
|
}
|