SpaceNinjaServer/src/types/personalRoomsTypes.ts

30 lines
854 B
TypeScript
Raw Normal View History

2024-05-06 15:39:27 +02:00
import { IApartment, IRooms, IPlacedDecosDatabase, TBootLocation } from "@/src/types/shipTypes";
import { Model, Types } from "mongoose";
export interface IOrbiter {
Features: string[];
Rooms: IRooms[];
ContentUrlSignature: string;
2024-05-06 15:39:27 +02:00
BootLocation?: TBootLocation;
}
export interface IPersonalRooms {
personalRoomsOwnerId: Types.ObjectId;
activeShipId: Types.ObjectId;
Ship: IOrbiter;
Apartment: IApartment;
}
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[];
};
};
export type PersonalRoomsModelType = Model<IPersonalRooms, {}, PersonalRoomsDocumentProps>;