package file_export

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

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

	lmTable := r.Group("/table")
	{
		var m *SysJob
		lmTable.GET("/list",
			middleware.PreAuthorize(nil),
			m.GetFileExportTable,
		)

	}
	lmFile := r.Group("/file")
	{
		var f *FileExport
		lmFile.GET("/list",
			middleware.PreAuthorize(nil),
			f.GetFileList,
		)
		lmFile.GET("/total",
			middleware.PreAuthorize(nil),
			f.Total,
		)
		lmFile.GET("/:fileName",
			middleware.PreAuthorize(nil),
			f.DownloadHandler,
		)
		lmFile.DELETE("/:fileName",
			middleware.PreAuthorize(nil),
			f.Delete,
		)
	}
}
