28 lines
476 B
Go
28 lines
476 B
Go
package schema
|
|
|
|
import (
|
|
"entgo.io/ent"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// Servers holds the schema definition for the Servers entity.
|
|
type Servers struct {
|
|
ent.Schema
|
|
}
|
|
|
|
// Fields of the Servers.
|
|
func (Servers) Fields() []ent.Field {
|
|
return []ent.Field{
|
|
field.Int("id").Unique(),
|
|
field.String("userid"),
|
|
field.String("serverid"),
|
|
field.Bool("isOwner"),
|
|
field.String("permission"),
|
|
}
|
|
}
|
|
|
|
// Edges of the Servers.
|
|
func (Servers) Edges() []ent.Edge {
|
|
return nil
|
|
}
|