SpaceNinjaServer/src/models/guildModel.ts
Sainan e35a7fd69f
feat: implement startDojoRecipeController to place new rooms in Dojo (#273)
Co-authored-by: Sainan <Sainan@users.noreply.github.com>
2024-06-06 16:55:37 +02:00

22 lines
584 B
TypeScript

import { IGuildDatabase, IDojoComponentDatabase } from "@/src/types/guildTypes";
import { model, Schema } from "mongoose";
const dojoComponentSchema = new Schema<IDojoComponentDatabase>({
pf: { type: String, required: true },
ppf: String,
pi: Schema.Types.ObjectId,
op: String,
pp: String,
CompletionTime: Date
});
const guildSchema = new Schema<IGuildDatabase>(
{
Name: { type: String, required: true },
DojoComponents: [dojoComponentSchema]
},
{ id: false }
);
export const Guild = model<IGuildDatabase>("Guild", guildSchema);