20 lines
283 B
Go
20 lines
283 B
Go
package schema
|
|
|
|
import (
|
|
"entgo.io/ent"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// Role holds the schema definition for the Role entity.
|
|
type Role struct {
|
|
ent.Schema
|
|
}
|
|
|
|
// Fields of the Role.
|
|
func (Role) Fields() []ent.Field {
|
|
return []ent.Field{
|
|
fieldID,
|
|
field.String("name"),
|
|
}
|
|
}
|