work_problem.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package models
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type WorkProblem struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. TypeId int64 `json:"type_id" type:"int" prop:"add" search:"="`
  9. Content string `json:"content" label:"问题名称" type:"string" prop:"add edit" search:"like"`
  10. Standard string `json:"standard" label:"整改标准" type:"string" prop:"edit"`
  11. Days int64 `json:"days" label:"整改时间" type:"int" prop:"edit" default:"0"`
  12. State int64 `json:"state" label:"状态" type:"int" prop:"edit" default:"0"`
  13. OrderAt int64 `json:"order_at" prop:"add:false select:false"`
  14. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  15. CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
  16. UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
  17. db.BaseModel
  18. }
  19. func (WorkProblem) TableName() string {
  20. return "zy_work_problem"
  21. }
  22. func (WorkProblem) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  23. return true
  24. }
  25. func (WorkProblem) OnePrivilege(c *gin.Context, id int64) bool {
  26. return true
  27. }
  28. func (WorkProblem) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  29. return nil
  30. }
  31. func (WorkProblem) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  32. return nil
  33. }
  34. func (WorkProblem) DelPrivilege(c *gin.Context, id int64) error {
  35. return nil
  36. }
  37. func (WorkProblem) OrderField() string {
  38. return "order_at"
  39. }
  40. func (WorkProblem) Page() bool {
  41. return false
  42. }
  43. func (WorkProblem) Count() bool {
  44. return true
  45. }