Files
ersteller/starter/ent/schema/user.go
T
Achim Rohn a15ca501b8 Add authentication, styling needs to be fixed
# Conflicts:
#	starter/ent/runtime.go
#	starter/go.mod
#	starter/go.sum
#	starter/routes/routing.go
2026-03-21 14:00:47 +00:00

29 lines
427 B
Go

package schema
import (
"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{
TimeMixin{},
}
}
// Fields of the User.
func (User) Fields() []ent.Field {
return []ent.Field{
field.String("email").
Unique(),
field.String("password_hash").
Default("").
Sensitive(),
}
}