51 lines
1.2 KiB
Go
51 lines
1.2 KiB
Go
package dto
|
|
|
|
import "base/pkg/validation"
|
|
|
|
type ProfileRole struct {
|
|
Id string `json:"id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
type CreateProfileRoleRequest struct {
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
func (*CreateProfileRoleRequest) Schema() validation.Schema {
|
|
return validation.Schema{
|
|
"title": validation.Rule{Field: "title", Type: validation.ValidationTypeString, Required: true},
|
|
"status": validation.Rule{Field: "status", Type: validation.ValidationTypeString, Required: true},
|
|
}
|
|
}
|
|
|
|
type UpdateProfileRoleRequest struct {
|
|
ID string `uri:"id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
func (*UpdateProfileRoleRequest) Schema() validation.Schema {
|
|
return validation.Schema{
|
|
"id": validation.Rule{Field: "id", Type: validation.ValidationTypeString, Required: true},
|
|
}
|
|
}
|
|
|
|
type GetProfileRoleRequest struct {
|
|
ID string `uri:"id"`
|
|
}
|
|
|
|
func (*GetProfileRoleRequest) Schema() validation.Schema {
|
|
return validation.Schema{
|
|
"id": validation.Rule{Field: "id", Type: validation.ValidationTypeString, Required: true},
|
|
}
|
|
}
|
|
|
|
type DeleteProfileRoleRequest struct {
|
|
ID string `uri:"id"`
|
|
}
|
|
|
|
func (*DeleteProfileRoleRequest) Schema() validation.Schema {
|
|
return validation.Schema{
|
|
"id": validation.Rule{Field: "id", Type: validation.ValidationTypeString, Required: true},
|
|
}
|
|
}
|