mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
8cb2428ea3
commit
2c8b5a65b7
41
entc/load/testdata/valid/schema.go
vendored
Normal file
41
entc/load/testdata/valid/schema.go
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
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"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user