portfolio/ent/schema/user.go

25 lines
366 B
Go
Raw Normal View History

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
}
// Fields of the User.
func (User) Fields() []ent.Field {
return []ent.Field{
field.String("name").
Default("John doe"),
}
}
// Edges of the User.
func (User) Edges() []ent.Edge {
return nil
}