fix: 用户信息更新返回类型与关注建表缺陷

updateMeLogic 更新后重新查询并返回 User 类型,修复 converter 转换
空响应的错误。proto_string 不再丢弃含空格的字符串。userfollows
ent schema 补上 created_at 的 Default(time.Now)。
This commit is contained in:
zetaloop
2026-04-05 17:04:48 +08:00
parent 4625363d5a
commit de32143b6d
5 changed files with 49 additions and 7 deletions
@@ -3,6 +3,7 @@ package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
"time"
)
// UserFollows holds the schema definition for the UserFollows entity.
@@ -16,7 +17,7 @@ func (UserFollows) Fields() []ent.Field {
field.Int64("id").Immutable().Unique(),
field.Int64("follower_id"),
field.Int64("followee_id"),
field.Time("created_at").Immutable(),
field.Time("created_at").Immutable().Default(time.Now),
}
}