sys_login_log.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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:exact;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:ctime;table:sys_login_log" comment:"创建时间"`
  13. EndTime string `form:"endTime" search:"type:lte;column:ctime;table:sys_login_log" comment:"创建时间"`
  14. SysLoginLogOrder
  15. }
  16. type SysLoginLogOrder struct {
  17. CreatedAtOrder string `search:"type:order;column:created_at;table:sys_login_log" form:"createdAtOrder"`
  18. }
  19. func (m *SysLoginLogGetPageReq) GetNeedSearch() interface{} {
  20. return *m
  21. }
  22. type SysLoginLogControl struct {
  23. ID int `uri:"Id" comment:"主键"` // 主键
  24. Username string `json:"username" comment:"用户名"`
  25. Status string `json:"status" comment:"状态"`
  26. Ipaddr string `json:"ipaddr" comment:"ip地址"`
  27. LoginLocation string `json:"loginLocation" comment:"归属地"`
  28. Browser string `json:"browser" comment:"浏览器"`
  29. Os string `json:"os" comment:"系统"`
  30. Platform string `json:"platform" comment:"固件"`
  31. LoginTime time.Time `json:"loginTime" comment:"登录时间"`
  32. Remark string `json:"remark" comment:"备注"`
  33. Msg string `json:"msg" comment:"信息"`
  34. }
  35. type SysLoginLogGetReq struct {
  36. Id int `uri:"id"`
  37. }
  38. func (s *SysLoginLogGetReq) GetId() interface{} {
  39. return s.Id
  40. }
  41. // SysLoginLogDeleteReq 功能删除请求参数
  42. type SysLoginLogDeleteReq struct {
  43. Ids []int `json:"ids"`
  44. }
  45. func (s *SysLoginLogDeleteReq) GetId() interface{} {
  46. return s.Ids
  47. }