1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package quote
- import (
- "zhiyuan/pkg/db"
- "github.com/gin-gonic/gin"
- )
- type Product struct {
- ID int64 `json:"id" prop:"add:false"`
- TypeId int64 `json:"type_id" type:"int" prop:"add" default:"0"`
- Name string `json:"name" label:"产品名称" type:"string" prop:"add edit" search:"="`
- Price float64 `json:"price" label:"价格" type:"float" prop:"add edit"`
- 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"`
- db.BaseModel
- }
- func (Product) TableName() string {
- return "zy_quote_product"
- }
- func (Product) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
- return true
- }
- func (Product) OnePrivilege(c *gin.Context, id int64) bool {
- return true
- }
- func (Product) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (Product) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (Product) DelPrivilege(c *gin.Context, id int64) error {
- return nil
- }
- func (Product) Page() bool {
- return false
- }
- func (Product) Count() bool {
- return true
- }
|