feat: 宠物加性格/过敏/备注字段 + 身份卡照护信息 + 微信取手机号

- Pet 增 personality/allergy/notes;建档表单加「性格标签(多选)/过敏/备注」
- IDCard 增 color/personality/owner/phone(脱敏)/allergy/notes/疫苗驱虫状态/发证机构
- 微信取手机号:POST /api/user/phone 用 getPhoneNumber 的 code 换手机号存库
  (BindPhoneByCode 走 getuserphonenumber,复用 access_token)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-31 17:12:56 +08:00
parent 93fc9bc5da
commit ef172f4e4a
9 changed files with 169 additions and 2 deletions
+6
View File
@@ -27,6 +27,9 @@ type PetInput struct {
Breed string
AvatarFileID string
Goals datatypes.JSON
Personality string
Allergy string
Notes string
}
func normalizeWeight(w string) string {
@@ -86,6 +89,9 @@ func (s *Service) CreatePet(userID string, in PetInput) (*model.Pet, error) {
Color: in.Color,
Breed: in.Breed,
AvatarFileID: in.AvatarFileID,
Personality: in.Personality,
Allergy: in.Allergy,
Notes: in.Notes,
HealthStatus: "正常",
Goals: in.Goals,
}