54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class PromotionLinkCategory
|
|
*
|
|
* @property int $promotion_link_id
|
|
* @property int $category_id
|
|
* @property Category $category
|
|
* @property PromotionLink $promotion_link
|
|
*
|
|
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory whereCategoryId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory wherePromotionLinkId($value)
|
|
*
|
|
* @mixin \Eloquent
|
|
*/
|
|
class PromotionLinkCategory extends Model
|
|
{
|
|
protected $table = 'promotion_link_category';
|
|
|
|
public $incrementing = false;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'promotion_link_id' => 'int',
|
|
'category_id' => 'int',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'promotion_link_id',
|
|
'category_id',
|
|
];
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
|
|
public function promotion_link()
|
|
{
|
|
return $this->belongsTo(PromotionLink::class);
|
|
}
|
|
}
|