package user

import (
	"github.com/gin-gonic/gin"
	"courseSign/server/api/v1"
	"courseSign/server/middleware"
)

type UsersMsgRouter struct {
}

// InitUsersMsgRouter 初始化 UsersMsg 路由信息
func (s *UsersMsgRouter) InitUsersMsgRouter(Router *gin.RouterGroup) {
	usersMsgRouter := Router.Group("usersMsg").Use(middleware.OperationRecord())
	usersMsgRouterWithoutRecord := Router.Group("usersMsg")
	var usersMsgApi = v1.ApiGroupApp.UserApiGroup.UsersMsgApi
	{
		usersMsgRouter.POST("createUsersMsg", usersMsgApi.CreateUsersMsg)   // 新建UsersMsg
		usersMsgRouter.DELETE("deleteUsersMsg", usersMsgApi.DeleteUsersMsg) // 删除UsersMsg
		usersMsgRouter.DELETE("deleteUsersMsgByIds", usersMsgApi.DeleteUsersMsgByIds) // 批量删除UsersMsg
		usersMsgRouter.PUT("updateUsersMsg", usersMsgApi.UpdateUsersMsg)    // 更新UsersMsg
		usersMsgRouter.POST("sendUsersMsg",usersMsgApi.SendUsersMsg) // 批量或单独发送私信
	}
	{
		usersMsgRouterWithoutRecord.GET("findUsersMsg", usersMsgApi.FindUsersMsg)        // 根据ID获取UsersMsg
		usersMsgRouterWithoutRecord.GET("getUsersMsgList", usersMsgApi.GetUsersMsgList)  // 获取UsersMsg列表
	}
}
