ldc-boutique-cnc/app/Models/Magasin.php

53 lines
1.2 KiB
PHP
Raw Permalink Normal View History

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 = [
'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',
];
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()
{
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()
{
return $this->hasMany(CollecteException::class);
}
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()
{
return $this->hasMany(Timeslot::class);
}
2021-04-21 17:50:57 +02:00
}