31 lines
546 B
Go
31 lines
546 B
Go
package schema
|
|
|
|
import (
|
|
"entgo.io/ent"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// Warns holds the schema definition for the Warns entity.
|
|
type Warns struct {
|
|
ent.Schema
|
|
}
|
|
|
|
// Fields of the Warns.
|
|
func (Warns) Fields() []ent.Field {
|
|
return []ent.Field{
|
|
field.Int("id").Unique(),
|
|
field.String("emitter"),
|
|
field.String("serverid"),
|
|
field.String("target"),
|
|
field.String("type"),
|
|
field.String("duration"),
|
|
field.String("reason"),
|
|
field.String("refid").Unique(),
|
|
}
|
|
}
|
|
|
|
// Edges of the Warns.
|
|
func (Warns) Edges() []ent.Edge {
|
|
return nil
|
|
}
|