36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
package backend
|
|
|
|
import (
|
|
"cron_admin/app/models/userinfomodel"
|
|
"time"
|
|
)
|
|
|
|
type UserListRequest struct {
|
|
Page int `json:"page" validate:"required" form:"page" example:"1"`
|
|
PageSize int `json:"page_size" validate:"required" form:"page_size" example:"10"`
|
|
Mobile string `json:"mobile" form:"mobile" example:"155555555"`
|
|
Status int `json:"status" form:"status" example:"1"`
|
|
Clientuniqueidentification string `json:"Clientuniqueidentification" form:"Clientuniqueidentification" example:"46516"`
|
|
}
|
|
|
|
type UserInfoRequest struct {
|
|
Id int `json:"id" form:"id" validate:"required" example:"1"`
|
|
}
|
|
|
|
type UserListResponse struct {
|
|
Id int `json:"id" form:"id"`
|
|
Clientuniqueidentification string `json:"clientuniqueidentification"`
|
|
Mobile string `json:"mobile"`
|
|
Status int `json:"status"`
|
|
Createtime string `json:"createtime"`
|
|
}
|
|
|
|
func (response *UserListResponse) ResponseFromDb(l userinfomodel.UserInfo) {
|
|
response.Id = l.Id
|
|
response.Clientuniqueidentification = l.Clientuniqueidentification
|
|
response.Mobile = l.Mobile
|
|
response.Status = l.Status
|
|
response.Createtime = l.Createtime.Format(time.DateTime)
|
|
return
|
|
}
|