Files
ent/entc/load/testdata/valid/schema.go
Ariel Mashraki 2c8b5a65b7 entc: abandon plugins
Summary:
Go plugin is not a good solution for both internal and external usage.
It's hard to manage and maintain matching versions (both Go and external libraries), and it does not support Windows.

Reviewed By: alexsn

Differential Revision: D16582217

fbshipit-source-id: 81876d2c6f30bbfc16ecf9e5000f0670f2e62484
2019-08-01 05:07:48 -07:00

42 lines
563 B
Go

package valid
import (
"fbc/ent"
"fbc/ent/field"
)
// User holds the user schema.
type User struct {
ent.Schema
}
func (User) Fields() []ent.Field {
return []ent.Field{
field.Int("age"),
field.String("name"),
}
}
// Group holds the group schema.
type Group struct {
ent.Schema
}
func (Group) Fields() []ent.Field {
return []ent.Field{
field.Time("expired_at"),
field.String("organization"),
}
}
// Tag holds the tag schema.
type Tag struct {
ent.Schema
}
func (Tag) Fields() []ent.Field {
return []ent.Field{
field.String("text"),
}
}