package kpi_c_title

import (
	"be.ems/src/framework/middleware"
	"github.com/gin-gonic/gin"
)

// Register Routes for kpi_c_title
func Register(r *gin.RouterGroup) {

	pmKPIC := r.Group("/kpiC")
	{
		var k *KpiCTitle
		pmKPIC.GET("/title",
			middleware.PreAuthorize(nil),
			k.Get,
		)
		pmKPIC.GET("/title/total",
			middleware.PreAuthorize(nil),
			k.Total,
		)
		pmKPIC.GET("/title/totalList",
			middleware.PreAuthorize(nil),
			k.GetToalList,
		)
		pmKPIC.POST("/title",
			middleware.PreAuthorize(nil),
			k.Post,
		)
		pmKPIC.PUT("/title/:id",
			middleware.PreAuthorize(nil),
			k.Put,
		)
		pmKPIC.DELETE("/title/:id",
			middleware.PreAuthorize(nil),
			k.Delete,
		)
	}
}
