42 lines
697 B
PHP
42 lines
697 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Calendrier extends Model
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $table = 'calendrier';
|
|
|
|
/**
|
|
* @var boolean
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'calendrier_id';
|
|
|
|
protected $dates = ['calendrier_startdate', 'calendrier_enddate'];
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'calendrier_startdate',
|
|
'calendrier_enddate'
|
|
];
|
|
|
|
/**
|
|
* ManyToOne
|
|
* Calendrier -> Coupon
|
|
*/
|
|
public function coupon()
|
|
{
|
|
return $this->belongsTo('App\Coupon', 'calendrier_couponId');
|
|
}
|
|
}
|