sys_login_log.go 2.3 KB

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