1234567891011121314151617181920212223242526272829 |
- package permission
- import (
- "git.sxidc.com/go-framework/baize/convenient/entity_crud"
- "git.sxidc.com/go-framework/baize/framework/binding"
- )
- // Simple Bind参数
- type Simple struct {
- // schema
- Schema string
- // 鉴权中间件
- AuthMiddleware binding.Middleware
- }
- func (simple *Simple) Bind(binder *binding.Binder) {
- entity_crud.BindSimple(binder, &entity_crud.Simple[Info]{
- Entity: &Entity{},
- Schema: simple.Schema,
- CreateJsonBody: &CreatePermissionJsonBody{},
- DeleteQueryParams: &DeletePermissionQueryParams{},
- UpdateJsonBody: &UpdatePermissionJsonBody{},
- QueryQueryParams: &GetPermissionsQueryParams{},
- GetByIDQueryParams: &GetPermissionQueryParams{},
- }, entity_crud.WithGlobalMiddlewares(simple.AuthMiddleware),
- entity_crud.WithCreateUserID(),
- entity_crud.WithLastUpdateUserID())
- }
|