ldc-boutique-cnc-sable/app/Models/Timeslot.php
2023-08-30 08:03:04 +00:00

49 lines
917 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Timeslot extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'order_id', 'magasin_id'
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'day' => 'date',
];
/**
* BelongsTo order relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function order()
{
return $this->belongsTo(Order::class);
}
/**
* BelongsTo magasin relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function magasin()
{
return $this->belongsTo(Magasin::class);
}
}