From c084b169c202559358f856e1cac3f17d569d7fe4 Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Wed, 10 Jan 2024 14:27:24 +0700 Subject: [PATCH 1/2] feat: update proto, pet --- constant/pet.constant.go | 12 ++++++------ go.mod | 2 +- go.sum | 2 ++ internal/model/pet.model.go | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/constant/pet.constant.go b/constant/pet.constant.go index e639a77..8b388d6 100644 --- a/constant/pet.constant.go +++ b/constant/pet.constant.go @@ -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" ) diff --git a/go.mod b/go.mod index 9ed3f16..b19e8a3 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 917eb10..1106dbc 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/internal/model/pet.model.go b/internal/model/pet.model.go index 4b63642..ba20326 100644 --- a/internal/model/pet.model.go +++ b/internal/model/pet.model.go @@ -9,6 +9,8 @@ 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"` @@ -16,7 +18,7 @@ type Pet struct { 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"` } From 53a7261176079ecfe2cffa53f8aac646029e9648 Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Wed, 10 Jan 2024 14:30:45 +0700 Subject: [PATCH 2/2] feat: pr template --- .../PULL_REQUEST_TEMPLATE/pull_request_template.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..7748e23 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,13 @@ +## Change made + +- [ ]  New features +- [ ]  Bug fixes +- [ ]  Breaking changes +## Describe what you have done +- +### New Features +- +### Fix +- +### Others +- \ No newline at end of file