portfolio/ent/schema/user.go
darius 9525329c8a Ent orm added
Error handler split file
Git ignore added
temporary test endpoints added
2024-02-14 00:08:14 +01:00

25 lines
366 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
}
// 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
}