Files
zetaloop de32143b6d fix: 用户信息更新返回类型与关注建表缺陷
updateMeLogic 更新后重新查询并返回 User 类型,修复 converter 转换
空响应的错误。proto_string 不再丢弃含空格的字符串。userfollows
ent schema 补上 created_at 的 Default(time.Now)。
2026-04-05 17:04:48 +08:00

28 lines
535 B
Go

package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
"time"
)
// UserFollows holds the schema definition for the UserFollows entity.
type UserFollows struct {
ent.Schema
}
// Fields of the UserFollows.
func (UserFollows) Fields() []ent.Field {
return []ent.Field{
field.Int64("id").Immutable().Unique(),
field.Int64("follower_id"),
field.Int64("followee_id"),
field.Time("created_at").Immutable().Default(time.Now),
}
}
// Edges of the UserFollows.
func (UserFollows) Edges() []ent.Edge {
return nil
}