package brc

import (
	v1 "ffie-admin/server/api/v1"
	"ffie-admin/server/middleware"

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

type BrcLockRouter struct {
}

// InitBrcLockRouter 初始化 BrcLock 路由信息
func (s *BrcLockRouter) InitBrcLockRouter(Router *gin.RouterGroup) {
	brcLockRouter := Router.Group("brcLock").Use(middleware.OperationRecord())
	brcLockRouterWithoutRecord := Router.Group("brcLock")
	var brcLockApi = v1.ApiGroupApp.BrcApiGroup.BrcLockApi
	{
		brcLockRouter.POST("createBrcLock", brcLockApi.CreateBrcLock)             // 新建BrcLock
		brcLockRouter.DELETE("deleteBrcLock", brcLockApi.DeleteBrcLock)           // 删除BrcLock
		brcLockRouter.DELETE("deleteBrcLockByIds", brcLockApi.DeleteBrcLockByIds) // 批量删除BrcLock
		brcLockRouter.PUT("updateBrcLock", brcLockApi.UpdateBrcLock)              // 更新BrcLock
	}
	{
		brcLockRouterWithoutRecord.GET("findBrcLock", brcLockApi.FindBrcLock)       // 根据ID获取BrcLock
		brcLockRouterWithoutRecord.GET("getBrcLockList", brcLockApi.GetBrcLockList) // 获取BrcLock列表
	}
}

// InitBrcLockRouter 初始化 BrcLockPub 路由信息
func (s *BrcLockRouter) InitBrcLockPubRouter(Router *gin.RouterGroup) {
	brcLockRouterWithoutRecord := Router.Group("brcLock")
	var brcLockApi = v1.ApiGroupApp.BrcApiGroup.BrcLockApi
	{
		brcLockRouterWithoutRecord.POST("createBrx20Tx", brcLockApi.BuildBrc20Tx) // 获取BrcLock列表
		brcLockRouterWithoutRecord.GET("getLockList", brcLockApi.GetLockList)     // 获取BrcLock列表
		brcLockRouterWithoutRecord.POST("updateLock", brcLockApi.UpdateLock)      // 获取BrcLock列表
	}
}
