package auth

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

type CreateCloudBrainForm struct {
	JobName           string `form:"job_name" binding:"Required"`
	Image             string `form:"image" binding:"Required"`
	Command           string `form:"command" binding:"Required"`
	Attachment        string `form:"attachment" binding:"Required"`
	JobType           string `form:"job_type" binding:"Required"`
	BenchmarkCategory string `form:"get_benchmark_category"`
	GpuType           string `form:"gpu_type"`
	ResourceSpecId    int    `form:"resource_spec_id" binding:"Required"`
}

type CommitImageCloudBrainForm struct {
	Description string `form:"description" binding:"Required"`
	Tag         string `form:"tag" binding:"Required"`
}

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