51 lines
913 B
PHP
51 lines
913 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PanierContent extends Model
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $table = 'panier_content';
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'panier_content_id';
|
|
|
|
/**
|
|
* @var boolean
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* ManyToOne
|
|
* PanierContent -> Panier
|
|
*/
|
|
public function panier()
|
|
{
|
|
return $this->belongsTo('App\Panier', 'panier_content_panierId', 'panier_id');
|
|
}
|
|
|
|
/**
|
|
* ManyToOne
|
|
* PanierContent -> Coupon
|
|
*/
|
|
public function coupon()
|
|
{
|
|
return $this->belongsTo('App\Coupon', 'panier_content_couponId');
|
|
}
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'panier_content_panierId',
|
|
'panier_content_couponId',
|
|
'panier_content_quantity',
|
|
'panier_content_printed'
|
|
];
|
|
}
|