Skip to content

Commit

Permalink
fix: change SOS post validate type
Browse files Browse the repository at this point in the history
  • Loading branch information
barabobBOB committed Apr 28, 2024
1 parent 32e0a59 commit d4db75c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/domain/sospost/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ type WriteSOSPostRequest struct {
Content string `json:"content" validate:"required"`
ImageIDs []int64 `json:"imageIds" validate:"required"`
Reward string `json:"reward"`
Dates []SOSDateView `json:"dates" validate:"required,min=1"`
Dates []SOSDateView `json:"dates" validate:"required,gte=1"`
CareType CareType `json:"careType" validate:"required,oneof=foster visiting"`
CarerGender CarerGender `json:"carerGender" validate:"required,oneof=male female all"`
RewardType RewardType `json:"rewardType" validate:"required,oneof=fee gifticon negotiable"`
ConditionIDs []int `json:"conditionIds"`
PetIDs []int64 `json:"petIds"`
ConditionIDs []int `json:"conditionIds" validate:"required,gte=1"`
PetIDs []int64 `json:"petIds" validate:"required,gte=1"`
}

type WriteSOSPostView struct {
Expand Down Expand Up @@ -160,13 +160,13 @@ type UpdateSOSPostRequest struct {
Title string `json:"title" validate:"required"`
Content string `json:"content" validate:"required"`
ImageIDs []int64 `json:"imageIds" validate:"required"`
Dates []SOSDateView `json:"dates" validate:"required"`
Dates []SOSDateView `json:"dates" validate:"required,gte=1"`
Reward string `json:"reward"`
CareType CareType `json:"careType" validate:"required,oneof=foster visiting"`
CarerGender CarerGender `json:"carerGender" validate:"required,oneof=male female all"`
RewardType RewardType `json:"rewardType" validate:"required,oneof=fee gifticon negotiable"`
ConditionIDs []int `json:"conditionIds,min=1"`
PetIDs []int `json:"petIds,min=1"`
ConditionIDs []int `json:"conditionIds" validate:"required,gte=1"`
PetIDs []int `json:"petIds" validate:"required,gte=1"`
}

type UpdateSOSPostView struct {
Expand Down

0 comments on commit d4db75c

Please sign in to comment.