2021-04-21 17:50:57 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Magasin extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
2021-04-22 15:21:09 +02:00
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2021-04-22 15:21:09 +02:00
|
|
|
protected $fillable = [
|
2022-11-25 14:42:18 +01:00
|
|
|
'name', 'email_contact', 'email_confirm', 'address', 'postcode', 'city', 'phone',
|
2021-04-22 15:21:09 +02:00
|
|
|
'latitude', 'longitude',
|
|
|
|
|
'gmaps_placeid', 'gmaps_embed_href', 'gmaps_link_href',
|
|
|
|
|
];
|
2021-04-22 18:18:52 +02:00
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* hasMany timeslot settings relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function timeslotSettings()
|
|
|
|
|
{
|
2021-04-22 18:18:52 +02:00
|
|
|
return $this->hasMany(TimeslotSetting::class);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* hasMany collecte exceptions relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function collecteExceptions()
|
|
|
|
|
{
|
2021-04-22 18:18:52 +02:00
|
|
|
return $this->hasMany(CollecteException::class);
|
|
|
|
|
}
|
2021-04-23 11:59:35 +02:00
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* hasMany timeslots relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function timeslots()
|
|
|
|
|
{
|
2021-04-23 11:59:35 +02:00
|
|
|
return $this->hasMany(Timeslot::class);
|
|
|
|
|
}
|
2021-04-21 17:50:57 +02:00
|
|
|
}
|