package ai_layout
import(
	"github.com/gin-gonic/gin"
	"goskeleton/app/utils/response"
	"goskeleton/app/http/controller/web"
	"goskeleton/app/http/validator/core/data_transfer"
	"goskeleton/app/global/consts"
)
type LayoutGenerate struct {
	DocContent string `form:"doc_content" json:"doc_content" binging:"required"`
}
func (l LayoutGenerate) CheckParams(context *gin.Context) {
	if err:=context.ShouldBind(&l);err!=nil{
		response.ValidatorError(context,err)
		return
	}
	extraAddBindDataContext := data_transfer.DataAddContext(l, consts.ValidatorPrefix, context)
	if extraAddBindDataContext == nil {
		response.ErrorSystem(context, "LayoutGenerate表单参数验证器json化失败", "")
		return
	}
	(&web.LayoutGenerate{}).LayoutGenerate(extraAddBindDataContext)
}