@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
62 lines (61 loc) • 2.7 kB
TypeScript
import * as mongoDB from "mongodb";
import { DataObjectBase } from "./DataObjectBase";
import { MemberItem } from "./MemberItem";
import { DataItem } from "./DataItem";
import { CurrencyItem } from "./CurrencyItem";
import { StatisticsItem } from "./StatisticsItem";
import { InventoryItem } from "./InventoryItem";
import { RemoveStatusItem } from "./RemoveStatusItem";
import { DataValueType } from "./type/DataValueType";
export declare class Group extends DataObjectBase {
private static readonly _groupId;
private static readonly _groupType;
private static readonly _catalogId;
private static readonly _members;
private static readonly _groupDatas;
private static readonly _groupCurrencies;
private static readonly _groupStatistics;
private static readonly _groupInventories;
private static readonly _removeStatus;
private readonly groupId;
private readonly groupType;
private readonly catalogId;
private members;
private groupCurrencies;
private groupStatistics;
private groupDatas;
private groupInventories;
private removeStatus;
constructor(result: mongoDB.WithId<mongoDB.Document>, collection: mongoDB.Collection<mongoDB.Document>);
private setDocumentGroup;
getGroupId(): string;
getGroupType(): number;
getCatalogId(): string;
getAllMembers(): Array<MemberItem>;
hasMember(memberId: string): boolean;
getMember(memberId: string): MemberItem;
setMember(memberId: string, status: number): void;
removeMember(memberId: string): void;
getAllGroupCurrencies(): Map<string, CurrencyItem>;
hasGroupCurrency(key: string): boolean;
getGroupCurrency(key: string): CurrencyItem;
changeGroupCurrency(key: string, value: number): void;
removeGroupCurrency(key: string): void;
getAllGroupDatas(): Array<DataItem>;
hasGroupData(key: string): boolean;
getGroupData(key: string): DataItem;
setGroupData(key: string, value: DataValueType): void;
removeItemData(key: string): void;
getAllGroupStatistics(): Map<string, StatisticsItem>;
hasGroupStatistics(key: string): boolean;
getGroupStatistics(key: string): StatisticsItem;
changeGroupStatistics(key: string, value: number, tsLastUpdate: number): void;
removeGroupStatistics(key: string): void;
getAllGroupInventories(): Array<InventoryItem>;
hasGroupInventory(itemId: string): boolean;
getGroupInventory(itemId: string): InventoryItem;
setGroupInventory(itemId: string, catalogId: string, classId: string): void;
removeGroupInventory(itemId: string): void;
getRemoveStatus(): RemoveStatusItem;
setRemoveStatus(tsRemove: number, reason?: string): void;
}