// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1

package handler

import (
	"net/http"

	notification "juwan-backend/app/notification/api/internal/handler/notification"
	"juwan-backend/app/notification/api/internal/svc"

	"github.com/zeromicro/go-zero/rest"
)

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
			{
				// 获取通知列表
				Method:  http.MethodGet,
				Path:    "/notifications",
				Handler: notification.ListNotificationsHandler(serverCtx),
			},
			{
				// 标记已读
				Method:  http.MethodPut,
				Path:    "/notifications/:id/read",
				Handler: notification.ReadNotificationHandler(serverCtx),
			},
			{
				// 全部已读
				Method:  http.MethodPut,
				Path:    "/notifications/read-all",
				Handler: notification.ReadAllNotificationsHandler(serverCtx),
			},
		},
		rest.WithPrefix("/api/v1"),
	)
}
