Files
schisandra-album-cloud-micr…/common/ent/schema/sca_auth_permission_rule.go
landaiqing 97ca3fc7b0 🎉 init
2024-11-12 17:00:16 +08:00

59 lines
1.1 KiB
Go

package schema
import (
"entgo.io/ent"
"entgo.io/ent/dialect"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
)
// ScaAuthPermissionRule holds the schema definition for the ScaAuthPermissionRule entity.
type ScaAuthPermissionRule struct {
ent.Schema
}
// Fields of the ScaAuthPermissionRule.
func (ScaAuthPermissionRule) Fields() []ent.Field {
return []ent.Field{
field.Int64("id").
SchemaType(map[string]string{
dialect.MySQL: "bigint(20) unsigned",
}).
Unique(),
field.String("ptype").
MaxLen(100).
Nillable(),
field.String("v0").
MaxLen(100).
Nillable(),
field.String("v1").
MaxLen(100).
Nillable(),
field.String("v2").
MaxLen(100).
Optional().
Nillable(),
field.String("v3").
MaxLen(100).
Optional().
Nillable(),
field.String("v4").
MaxLen(100).
Optional().
Nillable(),
field.String("v5").
MaxLen(100).
Optional().
Nillable(),
}
}
// Edges of the ScaAuthPermissionRule.
func (ScaAuthPermissionRule) Edges() []ent.Edge {
return []ent.Edge{
edge.From("sca_auth_role", ScaAuthRole.Type).
Ref("sca_auth_permission_rule").
Unique(),
}
}