package auth

import (
	"gitea.com/macaron/binding"
	"gitea.com/macaron/macaron"
)

type CreateModelArtsForm struct {
	JobName     string `form:"job_name" binding:"Required"`
	Attachment  string `form:"attachment"`
	Description string `form:"description"`
}

func (f *CreateModelArtsForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
	return validate(errs, ctx.Data, f, ctx.Locale)
}

type CreateModelArtsNotebookForm struct {
	JobName     string `form:"job_name" binding:"Required"`
	Attachment  string `form:"attachment"`
	Description string `form:"description"`
	Flavor      string `form:"flavor"`
}

func (f *CreateModelArtsNotebookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
	return validate(errs, ctx.Data, f, ctx.Locale)
}

type CreateModelArtsTrainJobForm struct {
	JobName               string `form:"job_name" binding:"Required"`
	Attachment            string `form:"attachment" binding:"Required"`
	BootFile              string `form:"boot_file" binding:"Required"`
	WorkServerNumber      int    `form:"work_server_number" binding:"Required"`
	EngineID              int    `form:"engine_id" binding:"Required"`
	PoolID                string `form:"pool_id" binding:"Required"`
	Flavor                string `form:"flavor" binding:"Required"`
	Params                string `form:"run_para_list" binding:"Required"`
	Description           string `form:"description"`
	IsSaveParam           string `form:"is_save_para"`
	ParameterTemplateName string `form:"parameter_template_name"`
	PrameterDescription   string `form:"parameter_description"`
	BranchName            string `form:"branch_name" binding:"Required"`
	VersionName           string `form:"version_name" binding:"Required"`
	FlavorName            string `form:"flaver_names" binding:"Required"`
	EngineName            string `form:"engine_names" binding:"Required"`
}

func (f *CreateModelArtsTrainJobForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
	return validate(errs, ctx.Data, f, ctx.Locale)
}
