demo_data_auth.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // ==========================================================================
  2. // GFast自动生成dao操作代码,无需手动修改,重新生成不会自动覆盖.
  3. // 生成日期:2022-03-03 10:11:15
  4. // 生成路径: gfast/app/demo/dao/demo_data_auth.go
  5. // 生成人:gfast
  6. // ==========================================================================
  7. package dao
  8. import (
  9. comModel "gfast/app/common/model"
  10. "gfast/app/demo/dao/internal"
  11. "github.com/gogf/gf/os/gtime"
  12. )
  13. // demoDataAuthDao is the manager for logic model data accessing and custom defined data operations functions management.
  14. // You can define custom methods on it to extend its functionality as you wish.
  15. type demoDataAuthDao struct {
  16. *internal.DemoDataAuthDao
  17. }
  18. var (
  19. // DemoDataAuth is globally public accessible object for table tools_gen_table operations.
  20. DemoDataAuth = demoDataAuthDao{
  21. internal.NewDemoDataAuthDao(),
  22. }
  23. )
  24. // Fill with you ideas below.
  25. // DemoDataAuthSearchReq 分页请求参数
  26. type DemoDataAuthSearchReq struct {
  27. Id string `p:"id" v:"id@integer#ID需为整数"` //ID
  28. Title string `p:"title"` //标题
  29. CreatedBy string `p:"createdBy" v:"createdBy@integer#创建人需为整数"` //创建人
  30. CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
  31. comModel.PageReq
  32. }
  33. // DemoDataAuthAddReq 添加操作请求参数
  34. type DemoDataAuthAddReq struct {
  35. Title string `p:"title" v:"required#标题不能为空"`
  36. CreatedBy uint64
  37. }
  38. // DemoDataAuthEditReq 修改操作请求参数
  39. type DemoDataAuthEditReq struct {
  40. Id uint `p:"id" v:"required#主键ID不能为空"`
  41. Title string `p:"title" v:"required#标题不能为空"`
  42. UpdatedBy uint64
  43. }
  44. // DemoDataAuthListRes 列表返回结果
  45. type DemoDataAuthListRes struct {
  46. Id uint `json:"id"`
  47. Title string `json:"title"`
  48. CreatedBy uint `json:"createdBy"`
  49. CreatedAt *gtime.Time `json:"createdAt"`
  50. }
  51. // DemoDataAuthInfoRes 数据返回结果
  52. type DemoDataAuthInfoRes struct {
  53. Id uint `json:"id"`
  54. Title string `json:"title"`
  55. CreatedBy uint `json:"createdBy"`
  56. UpdatedBy uint `json:"updatedBy"`
  57. CreatedAt *gtime.Time `json:"createdAt"`
  58. UpdatedAt *gtime.Time `json:"updatedAt"`
  59. DeletedAt *gtime.Time `json:"deletedAt"`
  60. }