final_site_item.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package final
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type FinalSiteItem struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. TableId int64 `json:"table_id" label:"表" type:"int" prop:"add edit" search:"="`
  9. Name string `json:"name" label:"项目名称" type:"string" prop:"add edit" search:"like"`
  10. Unit string `json:"unit" label:"单位" type:"string" prop:"edit"`
  11. Price float64 `json:"price" label:"单价" type:"float" prop:"edit" default:"0"`
  12. Num float64 `json:"num" label:"数量" type:"float" prop:"edit" default:"0"`
  13. Remark string `json:"remark" label:"备注" type:"string" prop:"edit"`
  14. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  15. CreatedAt int64 `json:"created_at" prop:"add:false"`
  16. UpdatedAt int64 `json:"updated_at" prop:"add:false"`
  17. db.BaseModel
  18. }
  19. func (FinalSiteItem) TableName() string {
  20. return "zy_final_site_item"
  21. }
  22. func (model FinalSiteItem) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  23. return true
  24. }
  25. func (FinalSiteItem) OnePrivilege(c *gin.Context, id int64) bool {
  26. return true
  27. }
  28. func (FinalSiteItem) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  29. return nil
  30. }
  31. func (FinalSiteItem) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  32. return nil
  33. }
  34. func (FinalSiteItem) DelPrivilege(c *gin.Context, id int64) error {
  35. return nil
  36. }
  37. func (FinalSiteItem) Page() bool {
  38. return false
  39. }
  40. func (FinalSiteItem) Count() bool {
  41. return true
  42. }
  43. func (model FinalSiteItem) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel {
  44. return []db.JoinModel{}
  45. }