mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
34 lines
995 B
Go
34 lines
995 B
Go
package validation
|
|
|
|
type Create struct {
|
|
Date string `json:"date" validate:"required"`
|
|
KandangId uint `json:"kandang_id" validate:"required"`
|
|
Category string `json:"category" validate:"required"`
|
|
Status string `json:"status" validate:"required"`
|
|
}
|
|
|
|
type Update struct {
|
|
Name *string `json:"name,omitempty" validate:"omitempty"`
|
|
}
|
|
|
|
type Query struct {
|
|
Page int `query:"page" validate:"omitempty,number,min=1,gt=0"`
|
|
Limit int `query:"limit" validate:"omitempty,number,min=1,max=100,gt=0"`
|
|
Search string `query:"search" validate:"omitempty,max=50"`
|
|
}
|
|
|
|
type AssignPhases struct {
|
|
PhaseIDs string `json:"phase_ids" validate:"required"`
|
|
}
|
|
|
|
type AssignTask struct {
|
|
EmployeeIDs string `json:"employee_ids" validate:"required"`
|
|
}
|
|
|
|
type UpdateAssignment struct {
|
|
TaskID uint `json:"task_id" validate:"required"`
|
|
EmployeeID uint `json:"employee_id" validate:"required"`
|
|
Checked *bool `json:"checked,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
}
|