package repository import ( "context" "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/entity" "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/permission" "go.mongodb.org/mongo-driver/mongo" ) type RoleRepository interface { List(ctx context.Context, param ListQuery) ([]*entity.Role, int64, error) GetByID(ctx context.Context, id string) (*entity.Role, error) GetByUID(ctx context.Context, uid string) (*entity.Role, error) All(ctx context.Context, clientID *string) ([]*entity.Role, error) Create(ctx context.Context, role *entity.Role) error Update(ctx context.Context, data UpdateReq) error Delete(ctx context.Context, id string) error RoleIndex } type RoleIndex interface { Index20250224UP(ctx context.Context) (*mongo.Cursor, error) } type ListQuery struct { PageSize int64 // 必填 PageIndex int64 // 必填 ClientID *string UID *string Name *string Status *permission.Status } type UpdateReq struct { ID string Name *string UID *string ClientID *string Status *permission.Status }