s_demo.go 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. package schema
  2. import "time"
  3. // Demo demo对象
  4. type Demo struct {
  5. RecordID string `json:"record_id"` // 记录ID
  6. Code string `json:"code" v:"required"` // 编号
  7. Name string `json:"name" v:"required"` // 名称
  8. Memo string `json:"memo"` // 备注
  9. Status int `json:"status" v:"required|max:2|min:1"` // 状态(1:启用 2:停用)
  10. Creator string `json:"creator"` // 创建者
  11. CreatedAt time.Time `json:"created_at"` // 创建时间
  12. }
  13. // DemoQueryParam 查询条件
  14. type DemoQueryParam struct {
  15. Code string `form:"-"` // 编号
  16. Status int `form:"status"` // 状态(1:启用 2:停用)
  17. LikeCode string `form:"likeCode"` // 编号(模糊查询)
  18. LikeName string `form:"likeName"` // 名称(模糊查询)
  19. }
  20. // DemoQueryOptions demo对象查询可选参数项
  21. type DemoQueryOptions struct {
  22. PageParam *PaginationParam // 分页参数
  23. }
  24. // DemoQueryResult demo对象查询结果
  25. type DemoQueryResult struct {
  26. Data []*Demo
  27. PageResult *PaginationResult
  28. }