52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
// 账户信息接口
|
|
export interface CkAccount {
|
|
id: number;
|
|
realName: string;
|
|
nickname: string | null;
|
|
memo: string | null;
|
|
avatar: string;
|
|
userName: string;
|
|
secret: string;
|
|
accountType: number;
|
|
departmentId: number;
|
|
useGoogleSecretKey: boolean;
|
|
hasVerifyGoogleSecret: boolean;
|
|
}
|
|
|
|
// 权限片段接口
|
|
export interface PrivilegeFrag {
|
|
// 根据实际数据结构补充
|
|
[key: string]: any;
|
|
}
|
|
|
|
// 租户信息接口
|
|
export interface CkTenant {
|
|
id: number;
|
|
name: string;
|
|
guid: string;
|
|
thirdParty: string | null;
|
|
tenantType: number;
|
|
deployName: string;
|
|
}
|
|
|
|
// 触客宝用户信息接口
|
|
export interface CkUserInfo {
|
|
account: CkAccount;
|
|
privilegeFrags: PrivilegeFrag[];
|
|
tenant: CkTenant;
|
|
}
|
|
|
|
// 状态接口
|
|
export interface CkChatState {
|
|
userInfo: CkUserInfo | null;
|
|
isLoggedIn: boolean;
|
|
setUserInfo: (userInfo: CkUserInfo) => void;
|
|
clearUserInfo: () => void;
|
|
updateAccount: (account: Partial<CkAccount>) => void;
|
|
updateTenant: (tenant: Partial<CkTenant>) => void;
|
|
getAccountId: () => number | null;
|
|
getTenantId: () => number | null;
|
|
getAccountName: () => string | null;
|
|
getTenantName: () => string | null;
|
|
}
|