Files
2026-03-31 22:12:06 +08:00

32 lines
718 B
Go

package schema
import (
"time"
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// UserPreferences holds the schema definition for the UserPreferences entity.
type UserPreferences struct {
ent.Schema
}
// Fields of the UserPreferences.
func (UserPreferences) Fields() []ent.Field {
return []ent.Field{
field.Int64("user_id"),
field.Bool("notification_order").Default(true),
field.Bool("notification_community").Default(true),
field.Bool("notification_system").Default(true),
field.String("theme").Default("light"),
field.String("language").Default("zh-CN"),
field.Time("updated_at").Default(time.Now),
}
}
// Edges of the UserPreferences.
func (UserPreferences) Edges() []ent.Edge {
return nil
}