27 lines
469 B
Go
27 lines
469 B
Go
|
package schema
|
||
|
|
||
|
import (
|
||
|
"entgo.io/ent"
|
||
|
"entgo.io/ent/schema/edge"
|
||
|
"entgo.io/ent/schema/field"
|
||
|
)
|
||
|
|
||
|
// Validators holds the schema definition for the Validators entity.
|
||
|
type Validators struct {
|
||
|
ent.Schema
|
||
|
}
|
||
|
|
||
|
// Fields of the Validators.
|
||
|
func (Validators) Fields() []ent.Field {
|
||
|
return []ent.Field{
|
||
|
field.String("facilitator").NotEmpty(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Edges of the Validators.
|
||
|
func (Validators) Edges() []ent.Edge {
|
||
|
return []ent.Edge{
|
||
|
edge.To("key", Key.Type),
|
||
|
}
|
||
|
}
|