diff --git a/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileCreateRequest.java b/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileCreateRequest.java index 9cfaac4..26dfc00 100644 --- a/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileCreateRequest.java +++ b/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileCreateRequest.java @@ -105,6 +105,16 @@ public class UserProfileCreateRequest { */ private String personalityTags; + /** + * 用户完整性格标签库 (JSON字符串) + */ + private String personalityTagLibrary; + + /** + * 用户完整兴趣爱好库 (JSON字符串) + */ + private String hobbyLibrary; + /** * 生日 */ diff --git a/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileUpdateRequest.java b/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileUpdateRequest.java index 4c0375b..a16c26d 100644 --- a/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileUpdateRequest.java +++ b/backend-single/src/main/java/com/emotion/dto/request/userprofile/UserProfileUpdateRequest.java @@ -109,6 +109,16 @@ public class UserProfileUpdateRequest { */ private String personalityTags; + /** + * 用户完整性格标签库 (JSON字符串) + */ + private String personalityTagLibrary; + + /** + * 用户完整兴趣爱好库 (JSON字符串) + */ + private String hobbyLibrary; + /** * 生日 */ diff --git a/backend-single/src/main/java/com/emotion/dto/response/userprofile/UserProfileResponse.java b/backend-single/src/main/java/com/emotion/dto/response/userprofile/UserProfileResponse.java index 332596f..746c2ec 100644 --- a/backend-single/src/main/java/com/emotion/dto/response/userprofile/UserProfileResponse.java +++ b/backend-single/src/main/java/com/emotion/dto/response/userprofile/UserProfileResponse.java @@ -124,6 +124,16 @@ public class UserProfileResponse { */ private String personalityTags; + /** + * 用户完整性格标签库 (JSON字符串) + */ + private String personalityTagLibrary; + + /** + * 用户完整兴趣爱好库 (JSON字符串) + */ + private String hobbyLibrary; + /** * 生日 */ diff --git a/backend-single/src/main/java/com/emotion/entity/UserProfile.java b/backend-single/src/main/java/com/emotion/entity/UserProfile.java index 0d561d9..2184422 100644 --- a/backend-single/src/main/java/com/emotion/entity/UserProfile.java +++ b/backend-single/src/main/java/com/emotion/entity/UserProfile.java @@ -139,6 +139,18 @@ public class UserProfile extends BaseEntity { @TableField("personality_tags") private String personalityTags; + /** + * 用户完整性格标签库 (JSON字符串,含剩余预设 + 自定义) + */ + @TableField("personality_tag_library") + private String personalityTagLibrary; + + /** + * 用户完整兴趣爱好库 (JSON字符串,含剩余预设 + 自定义) + */ + @TableField("hobby_library") + private String hobbyLibrary; + /** * 生日 */ diff --git a/backend-single/src/main/resources/db/migration/V20260624__add_user_profile_tag_library.sql b/backend-single/src/main/resources/db/migration/V20260624__add_user_profile_tag_library.sql new file mode 100644 index 0000000..046b7bb --- /dev/null +++ b/backend-single/src/main/resources/db/migration/V20260624__add_user_profile_tag_library.sql @@ -0,0 +1,4 @@ +-- 用户档案表新增标签库字段,用于存储用户专属的完整标签列表(含剩余预设 + 自定义) +ALTER TABLE t_user_profile + ADD COLUMN personality_tag_library TEXT DEFAULT NULL COMMENT '用户完整性格标签库(JSON数组)', + ADD COLUMN hobby_library TEXT DEFAULT NULL COMMENT '用户完整兴趣爱好库(JSON数组)';