change animal examples

This commit is contained in:
Havoc412 2024-10-16 17:41:01 +08:00
parent 88bff22526
commit 5437e72193
4 changed files with 18 additions and 21 deletions

2
.gitignore vendored
View File

@ -6,4 +6,4 @@ public/*
# logs # logs
store/logs/* store/logs/*
tmp/* tmp/

View File

@ -36,13 +36,13 @@ const (
"Latitude": 30.532645, "Latitude": 30.532645,
"Longitude": 114.367661, "Longitude": 114.367661,
"Avatar": "1.jpg", "Avatar": "1.jpg",
"AvatarHeight": 178, "avatar_height": 178,
"AvatarWidth": 118, "avatar_width": 118,
"HeadImg": "1.jpg", "head_img": "1.jpg",
"Photos": "", "Photos": "",
"ActivityRadius": 100, "activity_radius": 100,
"Tags": "", "Tags": "",
"NickName": "胖北,北子", "nick_names": "胖北,北子",
"face_breeds": "10,8,2", "face_breeds": "10,8,2",
"face_breed_probs": "0.9,0.09,0.01" "face_breed_probs": "0.9,0.09,0.01"
}, { }, {
@ -56,11 +56,11 @@ const (
"Latitude": 30.532645, "Latitude": 30.532645,
"Longitude": 114.367661, "Longitude": 114.367661,
"Avatar": "2.jpg", "Avatar": "2.jpg",
"AvatarHeight": 160, "avatar_height": 160,
"AvatarWidth": 213, "avatar_width": 213,
"HeadImg": "2.jpg", "head_img": "2.jpg",
"Photos": "", "Photos": "",
"ActivityRadius": 100, "activity_radius": 100,
"NickName": "打人三花,小花", "NickName": "打人三花,小花",
"Tags": "", "Tags": "",
"face_breeds": "10,8,2", "face_breeds": "10,8,2",
@ -76,11 +76,11 @@ const (
"Latitude": 30.532645, "Latitude": 30.532645,
"Longitude": 114.367661, "Longitude": 114.367661,
"Avatar": "4.jpg", "Avatar": "4.jpg",
"AvatarHeight": 191, "avatar_height": 191,
"AvatarWidth": 160, "avatar_width": 160,
"HeadImg": "4.jpg", "head_img": "4.jpg",
"Photos": "0.png,1.jpg,3.jpg", "Photos": "0.png,1.jpg,3.jpg",
"ActivityRadius": 100, "activity_radius": 100,
"nick_names": "猜皮,猪", "nick_names": "猜皮,猪",
"Tags": "臭脸,猜皮,玉玉", "Tags": "臭脸,猜皮,玉玉",
"face_breeds": "2,6,4", "face_breeds": "2,6,4",
@ -97,11 +97,11 @@ const (
"Latitude": 30.532645, "Latitude": 30.532645,
"Longitude": 114.367661, "Longitude": 114.367661,
"Avatar": "6.jpg", "Avatar": "6.jpg",
"AvatarHeight": 408, "avatar_height": 408,
"AvatarWidth": 306, "avatar_width": 306,
"HeadImg": "6.jpg", "head_img": "6.jpg",
"Photos": "", "Photos": "",
"ActivityRadius": 100, "activity_radius": 100,
"face_breeds": "8,7,5", "face_breeds": "8,7,5",
"face_breed_probs": "0.8,0.19,0.01" "face_breed_probs": "0.8,0.19,0.01"
}]` }]`
@ -161,7 +161,6 @@ func TestCreateAnimalList(t *testing.T) {
} }
for _, animal := range animals { for _, animal := range animals {
fmt.Println("animal:", animal)
animal := model.Animal{ animal := model.Animal{
Name: animal.Name, Name: animal.Name,
Birthday: animal.Birthday, Birthday: animal.Birthday,
@ -184,8 +183,6 @@ func TestCreateAnimalList(t *testing.T) {
Tags: animal.Tags, Tags: animal.Tags,
} }
fmt.Println("TEST: ", animal.FaceBreeds, animal.FaceBreedProbs)
result := DB.Create(&animal) result := DB.Create(&animal)
// 检查插入是否成功 // 检查插入是否成功

Binary file not shown.

Binary file not shown.