12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Models\Goods;
- use App\Base\BaseModel;
- use Illuminate\Database\Eloquent\SoftDeletes;
- /**
- * App\Models\Goods\GoodsCategoryMap
- *
- * @property int $id
- * @property int $goods_id
- * @property int $category_id
- * @property int $is_public 是否对普通会员展示
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap query()
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereCategoryId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereGoodsId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereIsPublic($value)
- * @method static \Illuminate\Database\Eloquent\Builder|GoodsCategoryMap whereUpdatedAt($value)
- * @mixin \Eloquent
- * @property-read \App\Models\Goods\Category|null $category
- * @property-read \App\Models\Goods\Goods|null $goods
- */
- class GoodsCategoryMap extends BaseModel
- {
- protected $table = "goods_category_map";
- protected $fillable = ['goods_id', "category_id", "is_public"];
- public function format(...$options)
- {
- }
- public function category()
- {
- return $this->belongsTo(Category::class);
- }
- public function goods()
- {
- return $this->belongsTo(Goods::class);
- }
- }
|