1234567891011121314151617181920212223242526272829 |
- package relations
- import (
- "git.sxidc.com/go-framework/baize/convenient/domain/auth/permission"
- "git.sxidc.com/go-framework/baize/convenient/domain/auth/permission_group"
- "git.sxidc.com/go-framework/baize/convenient/relation/many2many"
- "git.sxidc.com/go-framework/baize/framework/binding"
- )
- // SimplePermissionGroupAndPermission Bind参数
- type SimplePermissionGroupAndPermission struct {
- // schema
- Schema string
- // 鉴权中间件
- AuthMiddleware binding.Middleware
- }
- func (simple *SimplePermissionGroupAndPermission) Bind(binder *binding.Binder) {
- many2many.BindSimple(binder, &many2many.Simple[permission_group.Info, permission.Info]{
- Left: &permission_group.Entity{},
- Right: &permission.Entity{},
- Schema: simple.Schema,
- LeftUpdateJsonBody: &permission_group.UpdatePermissionsOfPermissionGroupJsonBody{},
- LeftQueryQueryParams: &permission_group.GetPermissionsOfPermissionGroupQueryParams{},
- RightUpdateJsonBody: &permission.UpdatePermissionGroupsOfPermissionJsonBody{},
- RightQueryQueryParams: &permission.GetPermissionGroupsOfPermissionQueryParams{},
- }, many2many.WithGlobalMiddlewares(simple.AuthMiddleware))
- }
|