2024-12-23 09:15:41 +01:00
|
|
|
import { IColor } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
2024-12-23 06:21:48 +01:00
|
|
|
import {
|
|
|
|
IApartment,
|
|
|
|
IRoom,
|
|
|
|
IPlacedDecosDatabase,
|
|
|
|
ITailorShop,
|
|
|
|
ITailorShopDatabase,
|
|
|
|
TBootLocation
|
|
|
|
} from "@/src/types/shipTypes";
|
2025-03-15 03:24:39 -07:00
|
|
|
import { Document, Model, Types } from "mongoose";
|
2024-02-18 13:58:43 +01:00
|
|
|
|
|
|
|
export interface IOrbiter {
|
|
|
|
Features: string[];
|
2024-12-22 20:32:19 +01:00
|
|
|
Rooms: IRoom[];
|
2025-01-20 18:25:50 +01:00
|
|
|
ContentUrlSignature?: string;
|
2024-05-06 15:39:27 +02:00
|
|
|
BootLocation?: TBootLocation;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPersonalRooms {
|
2024-12-23 09:15:41 +01:00
|
|
|
ShipInteriorColors: IColor;
|
2024-12-23 06:21:48 +01:00
|
|
|
Ship: IOrbiter;
|
|
|
|
Apartment: IApartment;
|
|
|
|
TailorShop: ITailorShop;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPersonalRoomsDatabase {
|
2024-12-23 09:15:41 +01:00
|
|
|
ShipInteriorColors: IColor;
|
2024-02-18 13:58:43 +01:00
|
|
|
personalRoomsOwnerId: Types.ObjectId;
|
|
|
|
activeShipId: Types.ObjectId;
|
|
|
|
Ship: IOrbiter;
|
|
|
|
Apartment: IApartment;
|
2024-12-23 06:21:48 +01:00
|
|
|
TailorShop: ITailorShopDatabase;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export type RoomsType = { Name: string; MaxCapacity: number; PlacedDecos: Types.DocumentArray<IPlacedDecosDatabase> };
|
|
|
|
|
|
|
|
export type PersonalRoomsDocumentProps = {
|
|
|
|
Ship: Omit<IOrbiter, "Rooms"> & {
|
|
|
|
Rooms: RoomsType[];
|
|
|
|
};
|
|
|
|
Apartment: Omit<IApartment, "Rooms"> & {
|
|
|
|
Rooms: RoomsType[];
|
|
|
|
};
|
2024-12-23 06:21:48 +01:00
|
|
|
TailorShop: Omit<ITailorShopDatabase, "Rooms"> & {
|
2024-12-22 20:32:19 +01:00
|
|
|
Rooms: RoomsType[];
|
|
|
|
};
|
2024-02-18 13:58:43 +01:00
|
|
|
};
|
|
|
|
|
2025-03-29 15:20:54 -07:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
2024-12-23 06:21:48 +01:00
|
|
|
export type PersonalRoomsModelType = Model<IPersonalRoomsDatabase, {}, PersonalRoomsDocumentProps>;
|
2025-03-15 03:24:39 -07:00
|
|
|
|
2025-03-29 15:20:54 -07:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
2025-03-15 03:24:39 -07:00
|
|
|
export type TPersonalRoomsDatabaseDocument = Document<unknown, {}, IPersonalRoomsDatabase> &
|
|
|
|
Omit<
|
|
|
|
IPersonalRoomsDatabase & {
|
|
|
|
_id: Types.ObjectId;
|
|
|
|
} & {
|
|
|
|
__v: number;
|
|
|
|
},
|
|
|
|
keyof PersonalRoomsDocumentProps
|
|
|
|
> &
|
|
|
|
PersonalRoomsDocumentProps;
|