Skip to content

Commit

Permalink
Merge pull request #7 from isd-sgcu/JOH-48/update-pet-type
Browse files Browse the repository at this point in the history
[JOH-48] Update pet
  • Loading branch information
bookpanda authored Jan 10, 2024
2 parents 7bb2b8c + 53a7261 commit 1e72e3c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Change made

- [ ]  New features
- [ ]  Bug fixes
- [ ]  Breaking changes
## Describe what you have done
-
### New Features
-
### Fix
-
### Others
-
12 changes: 6 additions & 6 deletions constant/pet.constant.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package constant

type Gender int
type Gender string

const (
MALE = 1
FEMALE = 2
MALE Gender = "male"
FEMALE Gender = "female"
)

type Status int
type Status string

const (
ADOPTED = 1
FINDHOME = 2
ADOPTED Status = "adopted"
FINDHOME Status = "findhome"
)
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.21.5
require (
github.com/golang/mock v1.6.0
github.com/google/uuid v1.5.0
github.com/isd-sgcu/johnjud-go-proto v0.2.4
github.com/isd-sgcu/johnjud-go-proto v0.3.1
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.31.0
github.com/spf13/viper v1.18.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ github.com/isd-sgcu/johnjud-go-proto v0.2.3 h1:PaT9x4hurtBE7eR2X9/eczhxcDiVgA6z4
github.com/isd-sgcu/johnjud-go-proto v0.2.3/go.mod h1:1OK6aiCgtXQiLhxp0r6iLEejYIRpckWQZDrCZ9Trbo4=
github.com/isd-sgcu/johnjud-go-proto v0.2.4 h1:amYofKCZGMKc+VQARmsZSPgmpxEJwQjv6VfbCxI9wLw=
github.com/isd-sgcu/johnjud-go-proto v0.2.4/go.mod h1:1OK6aiCgtXQiLhxp0r6iLEejYIRpckWQZDrCZ9Trbo4=
github.com/isd-sgcu/johnjud-go-proto v0.3.1 h1:WyWfzl+5nWOw3AmINtcTfojg4CJh8ZRNbZC6qA//OXU=
github.com/isd-sgcu/johnjud-go-proto v0.3.1/go.mod h1:1OK6aiCgtXQiLhxp0r6iLEejYIRpckWQZDrCZ9Trbo4=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
Expand Down
4 changes: 3 additions & 1 deletion internal/model/pet.model.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ type Pet struct {
Name string `json:"name" gorm:"tinytext"`
Birthdate string `json:"birthdate" gorm:"tinytext"`
Gender constant.Gender `json:"gender" gorm:"tinytext" example:"male"`
Color string `json:"color" gorm:"tinytext"`
Pattern string `json:"pattern" gorm:"tinytext"`
Habit string `json:"habit" gorm:"mediumtext"`
Caption string `json:"caption" gorm:"mediumtext"`
Status constant.Status `json:"status" gorm:"mediumtext" example:"findhome"`
IsSterile bool `json:"is_sterile"`
IsVaccinated bool `json:"is_vaccine"`
IsVisible bool `json:"is_visible"`
IsClubPet bool `json:"is_club_pet"`
Background string `json:"background" gorm:"tinytext"`
Origin string `json:"origin" gorm:"tinytext"`
Address string `json:"address" gorm:"tinytext"`
Contact string `json:"contact" gorm:"tinytext"`
}

0 comments on commit 1e72e3c

Please sign in to comment.