12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package quote
- import (
- "zhiyuan/pkg/db"
- "zhiyuan/services/structs"
- "github.com/gin-gonic/gin"
- )
- type Item struct {
- ID int64 `json:"id" prop:"add:false"`
- Category int64 `json:"category" type:"int" prop:"add edit" default:"0" search:"="`
- Name string `json:"name" label:"项目名称" type:"string" prop:"add edit" search:"="`
- RoomType int64 `json:"room_type" label:"房间类型" type:"int" prop:"add edit" default:"0" search:"="`
- CalcType int64 `json:"calc_type" label:"计算方式" type:"int" prop:"add edit" default:"0"`
- CalcParam string `json:"calc_param" label:"参数" type:"string" prop:"edit"`
- Description string `json:"description" label:"描述" type:"string" prop:"edit"`
- Price float64 `json:"price" label:"价格" type:"float" prop:"add edit"`
- ProductTypeId int64 `json:"product_type_id" label:"产品类型" type:"int" prop:"edit" default:"0"`
- DefaultProductId int64 `json:"default_product_id" label:"默认产品" type:"int" prop:"edit" default:"0"`
- DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
- CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
- UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
- CalcParamDecode structs.MaterialItemCalcParam `json:"childs" prop:"ignore"`
- db.BaseModel
- }
- func (Item) TableName() string {
- return "zy_quote_item"
- }
- func (Item) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
- return true
- }
- func (Item) OnePrivilege(c *gin.Context, id int64) bool {
- return true
- }
- func (Item) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (Item) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (Item) DelPrivilege(c *gin.Context, id int64) error {
- return nil
- }
- func (Item) Page() bool {
- return false
- }
- func (Item) Count() bool {
- return true
- }
|