package gmodel

import (
	"gorm.io/gorm"
)

// fs_canteen_product 餐厅类别产品对应表
type FsCanteenProduct struct {
	Id          int64   `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
	CanteenType *int64  `gorm:"index;default:0;" json:"canteen_type"`            // 餐厅类别id
	ProductId   *int64  `gorm:"default:0;" json:"product_id"`                    // 产品id
	SizeId      *int64  `gorm:"default:0;" json:"size_id"`                       // 尺寸id
	Sort        *int64  `gorm:"default:0;" json:"sort"`                          // 排序
	Status      *int64  `gorm:"default:0;" json:"status"`                        // 状态位 1启用0停用
	Ctime       *int64  `gorm:"default:0;" json:"ctime"`                         // 添加时间
	Sid         *string `gorm:"default:'';" json:"sid"`                          // 前端带入的id
}
type FsCanteenProductModel struct {
	db   *gorm.DB
	name string
}

func NewFsCanteenProductModel(db *gorm.DB) *FsCanteenProductModel {
	return &FsCanteenProductModel{db: db, name: "fs_canteen_product"}
}