2024-05-16 01:34:38 +02:00
|
|
|
import { Types } from "mongoose";
|
|
|
|
import { IOid, IMongoDate } from "@/src/types/commonTypes";
|
2024-06-06 16:55:37 +02:00
|
|
|
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
2024-05-16 01:34:38 +02:00
|
|
|
|
2024-05-04 15:42:25 +02:00
|
|
|
export interface IGuild {
|
|
|
|
Name: string;
|
|
|
|
}
|
|
|
|
|
2024-05-16 01:34:38 +02:00
|
|
|
export interface IGuildDatabase extends IGuild {
|
|
|
|
_id: Types.ObjectId;
|
2025-03-03 05:46:16 -08:00
|
|
|
DojoComponents: IDojoComponentDatabase[];
|
2024-12-23 23:12:21 +01:00
|
|
|
DojoCapacity: number;
|
|
|
|
DojoEnergy: number;
|
2025-01-03 09:06:50 +01:00
|
|
|
TechProjects?: ITechProjectDatabase[];
|
2024-05-04 15:42:25 +02:00
|
|
|
}
|
2024-05-16 01:34:38 +02:00
|
|
|
|
|
|
|
export interface IDojoClient {
|
|
|
|
_id: IOid; // ID of the guild
|
|
|
|
Name: string;
|
|
|
|
Tier: number;
|
|
|
|
FixedContributions: boolean;
|
|
|
|
DojoRevision: number;
|
|
|
|
RevisionTime: number;
|
|
|
|
Energy: number;
|
|
|
|
Capacity: number;
|
|
|
|
DojoRequestStatus: number;
|
|
|
|
DojoComponents: IDojoComponentClient[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IDojoComponentClient {
|
|
|
|
id: IOid;
|
2024-12-23 23:12:21 +01:00
|
|
|
pf: string; // Prefab (.level)
|
2024-05-16 01:34:38 +02:00
|
|
|
ppf: string;
|
2024-06-06 16:55:37 +02:00
|
|
|
pi?: IOid; // Parent ID. N/A to root.
|
2025-02-12 14:06:48 -08:00
|
|
|
op?: string; // Name of the door within this room that leads to its parent. N/A to root.
|
|
|
|
pp?: string; // Name of the door within the parent that leads to this room. N/A to root.
|
2025-02-11 20:11:31 -08:00
|
|
|
Name?: string;
|
|
|
|
Message?: string;
|
2024-06-06 16:55:37 +02:00
|
|
|
RegularCredits?: number; // "Collecting Materials" state: Number of credits that were donated.
|
|
|
|
MiscItems?: IMiscItem[]; // "Collecting Materials" state: Resources that were donated.
|
|
|
|
CompletionTime?: IMongoDate;
|
|
|
|
DecoCapacity?: number;
|
2024-05-16 01:34:38 +02:00
|
|
|
}
|
|
|
|
|
2024-06-06 16:55:37 +02:00
|
|
|
export interface IDojoComponentDatabase
|
|
|
|
extends Omit<IDojoComponentClient, "id" | "pi" | "CompletionTime" | "DecoCapacity"> {
|
2024-05-16 01:34:38 +02:00
|
|
|
_id: Types.ObjectId;
|
2024-06-06 16:55:37 +02:00
|
|
|
pi?: Types.ObjectId;
|
|
|
|
CompletionTime?: Date;
|
2024-05-16 01:34:38 +02:00
|
|
|
}
|
2025-01-03 09:06:50 +01:00
|
|
|
|
|
|
|
export interface ITechProjectClient {
|
|
|
|
ItemType: string;
|
|
|
|
ReqCredits: number;
|
|
|
|
ReqItems: IMiscItem[];
|
|
|
|
State: number; // 0 = pending, 1 = complete
|
|
|
|
CompletionDate?: IMongoDate;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITechProjectDatabase extends Omit<ITechProjectClient, "CompletionDate"> {
|
|
|
|
CompletionDate?: Date;
|
|
|
|
}
|