This commit is contained in:
@@ -3,16 +3,15 @@ package request
|
||||
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"`
|
||||
Bio string `json:"bio" validate:"omitempty,max=255"`
|
||||
Location string `json:"location" validate:"omitempty,max=100"`
|
||||
Website string `json:"website" validate:"omitempty,url"`
|
||||
CountryCode string `json:"country_code" validate:"omitempty,len=2"`
|
||||
Phone string `json:"phone" validate:"omitempty,min=8,max=20"`
|
||||
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"`
|
||||
Bio *string `json:"bio" validate:"omitempty,max=255"`
|
||||
Location *string `json:"location" validate:"omitempty,max=100"`
|
||||
Website *string `json:"website" validate:"omitempty,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"`
|
||||
|
||||
25
internal/dtos/request/verification.go
Normal file
25
internal/dtos/request/verification.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package request
|
||||
|
||||
import "time"
|
||||
|
||||
type SearchUserVerificationDto struct {
|
||||
PaginationDto
|
||||
Sort string `json:"sort" query:"sort" validate:"omitempty,oneof=id created_at reviewed_at status"`
|
||||
Search string `json:"search" query:"search" validate:"omitempty,min=2,max=200"`
|
||||
UserIDs []string `json:"user_ids" query:"user_ids" validate:"omitempty,dive,uuid"`
|
||||
VerifyTypes []string `json:"verify_types" query:"verify_types" validate:"omitempty,dive,ascii"`
|
||||
Statuses []string `json:"statuses" query:"statuses" validate:"omitempty,dive,ascii"`
|
||||
ReviewedBy *string `json:"reviewed_by" query:"reviewed_by" validate:"omitempty,uuid"`
|
||||
CreatedAfter *time.Time `json:"created_after" query:"created_after" validate:"omitempty"`
|
||||
CreatedBefore *time.Time `json:"created_before" query:"created_before" validate:"omitempty,gtfield=CreatedAfter"`
|
||||
}
|
||||
|
||||
type CreateUserVerificationDto struct {
|
||||
VerifyType string `json:"verify_type" validate:"required,oneof=ID_CARD EDUCATION EXPERT OTHER"`
|
||||
Content string `json:"content" validate:"required"`
|
||||
MediaIDs []string `json:"media_ids" validate:"omitempty,dive,uuid"`
|
||||
}
|
||||
|
||||
type UpdateVerificationStatusDto struct {
|
||||
Status string `json:"status" validate:"required,oneof=PENDING APPROVED REJECTED"`
|
||||
}
|
||||
Reference in New Issue
Block a user