package validation

type Create struct {
	Name           string  `json:"name" validate:"required_strict,min=3,max=50"`
	Status         string  `json:"status,omitempty" validate:"omitempty,min=3,max=50"`
	Capacity       float64 `json:"capacity" validate:"required_strict,gt=0"`
	LocationId     uint    `json:"location_id" validate:"required_strict,number,gt=0"`
	GroupId        uint    `json:"group_id" validate:"required_strict,number,gt=0"`
	PicId          uint    `json:"pic_id" validate:"required_strict,number,gt=0"`
	ProjectFlockId *uint   `json:"project_flock_id" validate:"omitempty,number,gt=0"`
}

type Update struct {
	Name           *string  `json:"name,omitempty" validate:"omitempty,max=50"`
	Status         *string  `json:"status,omitempty" validate:"omitempty,min=3,max=50"`
	Capacity       *float64 `json:"capacity" validate:"omitempty,gt=0"`
	LocationId     *uint    `json:"location_id,omitempty" validate:"omitempty,number,gt=0"`
	GroupId        *uint    `json:"group_id" validate:"required_strict,number,gt=0"`
	PicId          *uint    `json:"pic_id,omitempty" validate:"omitempty,number,gt=0"`
	ProjectFlockId *uint    `json:"project_flock_id,omitempty" validate:"omitempty,number,gt=0"`
}

type Query struct {
	Page       int    `query:"page" validate:"omitempty,number,min=1"`
	Limit      int    `query:"limit" validate:"omitempty,number,min=1,max=500"`
	Search     string `query:"search" validate:"omitempty,max=50"`
	LocationId int    `query:"location_id" validate:"omitempty,number,gt=0"`
	PicId      int    `query:"pic_id" validate:"omitempty,number,gt=0"`
}
