package system

import (
	"git.echol.cn/loser/st/server/api/v1"
	"git.echol.cn/loser/st/server/middleware"
	"github.com/gin-gonic/gin"
)

type LoginLogRouter struct{}

func (s *LoginLogRouter) InitLoginLogRouter(Router *gin.RouterGroup) {
	loginLogRouter := Router.Group("sysLoginLog").Use(middleware.OperationRecord())
	loginLogRouterWithoutRecord := Router.Group("sysLoginLog")
	sysLoginLogApi := v1.ApiGroupApp.SystemApiGroup.LoginLogApi
	{
		loginLogRouter.DELETE("deleteLoginLog", sysLoginLogApi.DeleteLoginLog)           // 删除登录日志
		loginLogRouter.DELETE("deleteLoginLogByIds", sysLoginLogApi.DeleteLoginLogByIds) // 批量删除登录日志
	}
	{
		loginLogRouterWithoutRecord.GET("findLoginLog", sysLoginLogApi.FindLoginLog)       // 根据ID获取登录日志(详情)
		loginLogRouterWithoutRecord.GET("getLoginLogList", sysLoginLogApi.GetLoginLogList) // 获取登录日志列表
	}
}
