SpaceNinjaServer/src/models/guildModel.ts
Sainan 63712121af
feat: more work on clans (#214)
Co-authored-by: Sainan <Sainan@users.noreply.github.com>
2024-05-16 01:34:38 +02:00

19 lines
521 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,
CompletionTime: Date
});
const guildSchema = new Schema<IGuildDatabase>(
{
Name: { type: String, required: true },
DojoComponents: [dojoComponentSchema]
},
{ id: false }
);
export const Guild = model<IGuildDatabase>("Guild", guildSchema);