package v1

import (
	"kami/api/commonApi"
	"kami/internal/model/entity"

	"github.com/gogf/gf/v2/frame/g"
)

// LoginLogQueryReq 登录日志查询请求
type LoginLogQueryReq struct {
	g.Meta    `path:"/sys-user-login-log/list" tags:"用户登录日志管理" method:"get" summary:"查询登录日志列表"`
	UserId    string `p:"userId" dc:"用户ID（可选）"`
	LoginName string `p:"loginName" dc:"登录名（可选）"`
	Status    int    `p:"status" dc:"登录状态：1登录成功 2登录失败（可选）"`
	StartTime string `p:"startTime" dc:"开始时间，格式为：2006-01-02（可选）"`
	EndTime   string `p:"endTime" dc:"结束时间，格式为：2006-01-02（可选）"`
	commonApi.CommonPageReq
}

// LoginLogQueryRes 登录日志查询响应
type LoginLogQueryRes struct {
	g.Meta `mime:"application/json"`
	commonApi.CommonPageRes[*entity.V1SysUserLoginLog]
}

// LoginLogDetailReq 登录日志详情查询请求
type LoginLogDetailReq struct {
	g.Meta `path:"/sys-user-login-log/detail" tags:"用户登录日志管理" method:"get" summary:"查询登录日志详情"`
	commonApi.CommonIntId
}

// LoginLogDetailRes 登录日志详情响应
type LoginLogDetailRes struct {
	g.Meta `mime:"application/json"`
	Data   *entity.V1SysUserLoginLog `json:"data"`
}
