SpaceNinjaServer/src/types/personalRoomsTypes.ts
Sainan 3937dc0ef8
All checks were successful
Build / build (push) Successful in 1m30s
Build / build (pull_request) Successful in 1m25s
rename IPersonalRooms to IPersonalRoomsClient
2025-04-26 00:45:56 +02:00

68 lines
1.9 KiB
TypeScript

import { IColor } from "@/src/types/inventoryTypes/commonInventoryTypes";
import {
IRoom,
IPlacedDecosDatabase,
ITailorShop,
ITailorShopDatabase,
TBootLocation,
IApartmentDatabase,
IApartmentClient
} from "@/src/types/shipTypes";
import { Document, Model, Types } from "mongoose";
export interface IOrbiter {
Features: string[];
Rooms: IRoom[];
VignetteFish?: string[];
FavouriteLoadoutId?: Types.ObjectId;
Wallpaper?: string;
Vignette?: string;
ContentUrlSignature?: string;
BootLocation?: TBootLocation;
}
export interface IPersonalRoomsClient {
ShipInteriorColors: IColor;
Ship: IOrbiter;
Apartment: IApartmentClient;
TailorShop: ITailorShop;
}
export interface IPersonalRoomsDatabase {
ShipInteriorColors: IColor;
personalRoomsOwnerId: Types.ObjectId;
activeShipId: Types.ObjectId;
Ship: IOrbiter;
Apartment: IApartmentDatabase;
TailorShop: ITailorShopDatabase;
}
export type RoomsType = { Name: string; MaxCapacity: number; PlacedDecos: Types.DocumentArray<IPlacedDecosDatabase> };
export type PersonalRoomsDocumentProps = {
Ship: Omit<IOrbiter, "Rooms"> & {
Rooms: RoomsType[];
};
Apartment: Omit<IApartmentDatabase, "Rooms"> & {
Rooms: RoomsType[];
};
TailorShop: Omit<ITailorShopDatabase, "Rooms"> & {
Rooms: RoomsType[];
};
};
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type PersonalRoomsModelType = Model<IPersonalRoomsDatabase, {}, PersonalRoomsDocumentProps>;
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type TPersonalRoomsDatabaseDocument = Document<unknown, {}, IPersonalRoomsDatabase> &
Omit<
IPersonalRoomsDatabase & {
_id: Types.ObjectId;
} & {
__v: number;
},
keyof PersonalRoomsDocumentProps
> &
PersonalRoomsDocumentProps;