Files
ersteller/starter/ent/schema/user.go
T
2025-11-15 12:16:59 +01:00

29 lines
480 B
Go

package schema
import (
"git.gorlug.de/code/ersteller/schema/ent"
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// User holds the schema definition for the User entity.
type User struct {
ent.Schema
}
func (User) Mixin() []ent.Mixin {
return []ent.Mixin{
ersteller_ent.TimeMixin{},
}
}
// Fields of the User.
func (User) Fields() []ent.Field {
return []ent.Field{
field.String("email").
Default("unknown@localhost"),
field.String("password").Default(""),
}
}