实现角色接口增删改查

This commit is contained in:
2025-06-03 16:04:00 +08:00
parent bcd274c750
commit fedcd288e8
35 changed files with 596 additions and 57 deletions

36
internal/service/role.go Normal file
View File

@ -0,0 +1,36 @@
// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"context"
"server/internal/model"
)
type (
IRole interface {
Create(ctx context.Context, in *model.RoleCreateInput) (out *model.CreateOut, err error)
Delete(ctx context.Context, in *model.RoleDeleteInput) (out *model.DeleteOut, err error)
BatchDelete(ctx context.Context, in *model.BatchDeleteIn) (out *model.DeleteOut, err error)
Update(ctx context.Context, in *model.RoleUpdateInput) (out *model.UpdateOut, err error)
GetRoleList(ctx context.Context, in *model.RoleListInput) (out *model.RoleListOutput, err error)
}
)
var (
localRole IRole
)
func Role() IRole {
if localRole == nil {
panic("implement not found for interface IRole, forgot register?")
}
return localRole
}
func RegisterRole(i IRole) {
localRole = i
}