tmp org api rewrite (#4304)

* sync collection

* remove lock

* tmp org api rewrite
This commit is contained in:
Archer
2025-03-25 09:57:19 +08:00
committed by archer
parent 5a47af6fff
commit 826a53dcb6
13 changed files with 66 additions and 99 deletions

View File

@@ -1,6 +1,6 @@
import type { TeamPermission } from 'support/permission/user/controller';
import type { TeamPermission } from '../../../permission/user/controller';
import { ResourcePermissionType } from '../type';
import { SourceMemberType } from 'support/user/type';
import { SourceMemberType } from '../../type';
type OrgSchemaType = {
_id: string;
@@ -8,7 +8,7 @@ type OrgSchemaType = {
pathId: string;
path: string;
name: string;
avatar?: string;
avatar: string;
description?: string;
updateTime: Date;
};
@@ -20,7 +20,12 @@ type OrgMemberSchemaType = {
tmbId: string;
};
type OrgType = Omit<OrgSchemaType, 'avatar'> & {
export type OrgListItemType = OrgSchemaType & {
permission: TeamPermission;
total: number; // members + children orgs
};
export type OrgType = Omit<OrgSchemaType, 'avatar'> & {
avatar: string;
permission: TeamPermission;
members: OrgMemberSchemaType[];