-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace in SOSpost with sqlc
- Loading branch information
1 parent
b814449
commit a24ad08
Showing
12 changed files
with
543 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package sospost | ||
|
||
import "github.com/pet-sitter/pets-next-door-api/internal/domain/commonvo" | ||
|
||
type WriteSOSPostRequest struct { | ||
Title string `json:"title" validate:"required"` | ||
Content string `json:"content" validate:"required"` | ||
ImageIDs []int64 `json:"imageIds" validate:"required"` | ||
Reward string `json:"reward" validate:"required"` | ||
Dates []SOSDateView `json:"dates" validate:"required,gte=1"` | ||
CareType commonvo.CareType `json:"careType" validate:"required,oneof=foster visiting"` | ||
CarerGender commonvo.CarerGender `json:"carerGender" validate:"required,oneof=male female all"` | ||
RewardType commonvo.RewardType `json:"rewardType" validate:"required,oneof=fee gifticon negotiable"` | ||
ConditionIDs []int `json:"conditionIds" validate:"required"` | ||
PetIDs []int64 `json:"petIds" validate:"required,gte=1"` | ||
} | ||
|
||
type UpdateSOSPostRequest struct { | ||
ID int `json:"id" validate:"required"` | ||
Title string `json:"title" validate:"required"` | ||
Content string `json:"content" validate:"required"` | ||
ImageIDs []int64 `json:"imageIds" validate:"required"` | ||
Dates []SOSDateView `json:"dates" validate:"required,gte=1"` | ||
Reward string `json:"reward" validate:"required"` | ||
CareType commonvo.CareType `json:"careType" validate:"required,oneof=foster visiting"` | ||
CarerGender commonvo.CarerGender `json:"carerGender" validate:"required,oneof=male female all"` | ||
RewardType commonvo.RewardType `json:"rewardType" validate:"required,oneof=fee gifticon negotiable"` | ||
ConditionIDs []int `json:"conditionIds" validate:"required"` | ||
PetIDs []int64 `json:"petIds" validate:"required,gte=1"` | ||
} |
Oops, something went wrong.