package router

import (
	"github.com/gin-gonic/gin"
)

func RegisterAudit(group, public *gin.RouterGroup, h *Audit) {
	operations := group.Group("/sysOperationRecord")
	operations.GET("/getSysOperationRecordList", h.Operations)
	operations.GET("/findSysOperationRecord", h.Operation)
	operations.DELETE("/deleteSysOperationRecord", h.DeleteOperation)
	operations.DELETE("/deleteSysOperationRecordByIds", h.DeleteOperations)
	logins := group.Group("/sysLoginLog")
	logins.GET("/getLoginLogList", h.Logins)
	logins.GET("/findLoginLog", h.Login)
	logins.DELETE("/deleteLoginLog", h.DeleteLogin)
	logins.DELETE("/deleteLoginLogByIds", h.DeleteLogins)
	access := group.Group("/dataAccessLog")
	access.POST("/getDataAccessLogList", h.DataAccess)
	access.DELETE("/deleteDataAccessLogByIds", h.DeleteDataAccess)
	viewer := group.Group("/logViewer")
	viewer.GET("/dates", h.LogDates)
	viewer.GET("/files", h.LogFiles)
	viewer.GET("/content", h.LogContent)
	errors := group.Group("/sysError")
	errors.DELETE("/deleteSysError", h.DeleteError)
	errors.DELETE("/deleteSysErrorByIds", h.DeleteErrors)
	errors.PUT("/updateSysError", h.UpdateError)
	errors.GET("/findSysError", h.Error)
	errors.GET("/getSysErrorList", h.Errors)
	public.Group("/sysError").POST("/createSysError", h.CreateError)
}
