zkt24/z2/backend/ent/schema/validators.go

27 lines
469 B
Go
Raw Permalink Normal View History

2024-04-25 11:51:47 +00:00
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),
}
}