plan_types.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package plan
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type PlanTypes struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. Name string `json:"name" label:"名称" type:"string" prop:"add edit" search:"like"`
  9. TypeId int64 `json:"typeId" label:"类型ID" type:"int" prop:"add" search:"="`
  10. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  11. CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
  12. UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
  13. db.BaseModel
  14. }
  15. func (PlanTypes) TableName() string {
  16. return "zy_plan_types"
  17. }
  18. func (PlanTypes) OrderField() string {
  19. return "order_at"
  20. }
  21. func (PlanTypes) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  22. return true
  23. }
  24. func (PlanTypes) OnePrivilege(c *gin.Context, id int64) bool {
  25. return true
  26. }
  27. func (PlanTypes) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  28. return nil
  29. }
  30. func (PlanTypes) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  31. return nil
  32. }
  33. func (PlanTypes) DelPrivilege(c *gin.Context, id int64) error {
  34. return nil
  35. }
  36. func (PlanTypes) Page() bool {
  37. return false
  38. }
  39. func (PlanTypes) Count() bool {
  40. return true
  41. }