This commit is contained in:
7
internal/dtos/request/entity.go
Normal file
7
internal/dtos/request/entity.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package request
|
||||
|
||||
type SearchEntityDto struct {
|
||||
Cursor string `json:"cursor" query:"cursor" validate:"omitempty,uuid"`
|
||||
Limit int `json:"limit" query:"limit" validate:"omitempty,min=1,max=100"`
|
||||
Name string `json:"name" query:"name" validate:"omitempty,max=255"`
|
||||
}
|
||||
10
internal/dtos/request/geometry.go
Normal file
10
internal/dtos/request/geometry.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package request
|
||||
|
||||
type SearchGeometryDto struct {
|
||||
MinLng *float64 `query:"min_lng" validate:"required,gte=-180,lte=180"`
|
||||
MinLat *float64 `query:"min_lat" validate:"required,gte=-90,lte=90"`
|
||||
MaxLng *float64 `query:"max_lng" validate:"required,gte=-180,lte=180"`
|
||||
MaxLat *float64 `query:"max_lat" validate:"required,gte=-90,lte=90"`
|
||||
TimePoint *int32 `json:"time" query:"time" validate:"omitempty,number"`
|
||||
EntityID *string `json:"entity_id" query:"entity_id" validate:"omitempty,uuid"`
|
||||
}
|
||||
@@ -5,13 +5,14 @@ import "time"
|
||||
type UpdateProfileDto struct {
|
||||
DisplayName *string `json:"display_name" validate:"omitempty,min=2,max=50"`
|
||||
FullName *string `json:"full_name" validate:"omitempty,min=2,max=100"`
|
||||
AvatarUrl *string `json:"avatar_url" validate:"omitempty,url,image_url"`
|
||||
AvatarUrl *string `json:"avatar_url" validate:"omitempty,image_url"`
|
||||
Bio *string `json:"bio" validate:"omitempty,max=255"`
|
||||
Location *string `json:"location" validate:"omitempty,max=100"`
|
||||
Website *string `json:"website" validate:"omitempty,url"`
|
||||
Website *string `json:"website" validate:"omitempty,optional_url"`
|
||||
CountryCode *string `json:"country_code" validate:"omitempty,len=2"`
|
||||
Phone *string `json:"phone" validate:"omitempty,min=8,max=20"`
|
||||
}
|
||||
|
||||
type ChangePasswordDto struct {
|
||||
OldPassword string `json:"old_password" validate:"required,min=8,max=64"`
|
||||
NewPassword string `json:"new_password" validate:"required,min=8,max=64,nefield=OldPassword"`
|
||||
@@ -26,6 +27,7 @@ type PaginationDto struct {
|
||||
Limit int `json:"limit" query:"limit" validate:"omitempty,min=1,max=100"`
|
||||
Order string `json:"order" query:"order" validate:"omitempty,oneof=asc desc"`
|
||||
}
|
||||
|
||||
type SearchUserDto struct {
|
||||
PaginationDto
|
||||
Sort string `json:"sort" query:"sort" validate:"omitempty,oneof=id created_at updated_at email is_deleted auth_provider"`
|
||||
|
||||
8
internal/dtos/request/wiki.go
Normal file
8
internal/dtos/request/wiki.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package request
|
||||
|
||||
type SearchWikiDto struct {
|
||||
Cursor string `json:"cursor" query:"cursor" validate:"omitempty,uuid"`
|
||||
Limit int `json:"limit" query:"limit" validate:"omitempty,min=1,max=100"`
|
||||
Title string `json:"title" query:"title" validate:"omitempty,max=1000"`
|
||||
EntityID string `json:"entity_id" query:"entity_id" validate:"omitempty,uuid"`
|
||||
}
|
||||
Reference in New Issue
Block a user