sys_login_log_dto.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package dto
  2. import (
  3. "cold-delivery/common/dto"
  4. common "cold-delivery/common/model"
  5. "time"
  6. )
  7. type SysLoginLogGetPageReq struct {
  8. dto.Pagination `search:"-"`
  9. Username string `form:"username" search:"type:exact;column:username;table:sys_error: %s_log" comment:"用户名"`
  10. Status string `form:"status" search:"type:exact;column:status;table:sys_error: %s_log" comment:"状态"`
  11. Ipaddr string `form:"ipaddr" search:"type:exact;column:ipaddr;table:sys_login_log" comment:"ip地址"`
  12. LoginLocation string `form:"loginLocation" search:"type:exact;column:login_location;table:sys_login_log" comment:"归属地"`
  13. BeginTime string `form:"beginTime" search:"type:gte;column:ctime;table:sys_login_log" comment:"创建时间"`
  14. EndTime string `form:"endTime" search:"type:lte;column:ctime;table:sys_login_log" comment:"结束时间"`
  15. SysLoginLogOrder
  16. }
  17. type SysLoginLogOrder struct {
  18. CreatedAtOrder string `search:"type:order;column:created_at;table:sys_login_log" form:"createdAtOrder"`
  19. }
  20. func (m *SysLoginLogGetPageReq) GetNeedSearch() interface{} {
  21. return *m
  22. }
  23. type SysLoginLogControl struct {
  24. ID int `uri:"Id" comment:"主键"` // 主键
  25. Username string `json:"username" comment:"用户名"`
  26. Status string `json:"status" comment:"状态"`
  27. Ipaddr string `json:"ipaddr" comment:"ip地址"`
  28. LoginLocation string `json:"loginLocation" comment:"归属地"`
  29. Browser string `json:"browser" comment:"浏览器"`
  30. Os string `json:"os" comment:"系统"`
  31. Platform string `json:"platform" comment:"固件"`
  32. LoginTime time.Time `json:"loginTime" comment:"登录时间"`
  33. Remark string `json:"remark" comment:"备注"`
  34. Msg string `json:"msg" comment:"信息"`
  35. }
  36. type SysLoginLogGetReq struct {
  37. Id int `uri:"id"`
  38. }
  39. func (s *SysLoginLogGetReq) GetId() interface{} {
  40. return s.Id
  41. }
  42. // SysLoginLogDeleteReq 功能删除请求参数
  43. type SysLoginLogDeleteReq struct {
  44. Ids []int `json:"ids"`
  45. common.ControlBy `swaggerignore:"true"`
  46. }
  47. func (s *SysLoginLogDeleteReq) GetId() interface{} {
  48. return s.Ids
  49. }