diff --git a/src/app/service/pet/pet.service.go b/src/app/service/pet/pet.service.go index 26c2902..b98cf48 100644 --- a/src/app/service/pet/pet.service.go +++ b/src/app/service/pet/pet.service.go @@ -129,16 +129,16 @@ func DtoToRaw(in *proto.Pet) (res *pet.Pet, err error) { } switch in.Gender { - case 1: + case 0: gender = petConst.MALE - case 2: + case 1: gender = petConst.FEMALE } switch in.Status { - case 1: + case 0: status = petConst.ADOPTED - case 2: + case 1: status = petConst.FINDHOME } diff --git a/src/constant/pet/pet.constant.go b/src/constant/pet/pet.constant.go index 34f4dc4..577bed6 100644 --- a/src/constant/pet/pet.constant.go +++ b/src/constant/pet/pet.constant.go @@ -3,13 +3,13 @@ package pet type Gender int const ( - MALE = 1 - FEMALE = 2 + MALE = 0 + FEMALE = 1 ) type Status int const ( - ADOPTED = 1 - FINDHOME = 2 + ADOPTED = 0 + FINDHOME = 1 )