2024-05-16 01:34:38 +02:00
|
|
|
import { IGuildDatabase, IDojoComponentDatabase } from "@/src/types/guildTypes";
|
2024-05-04 15:42:25 +02:00
|
|
|
import { model, Schema } from "mongoose";
|
|
|
|
|
2024-05-16 01:34:38 +02:00
|
|
|
const dojoComponentSchema = new Schema<IDojoComponentDatabase>({
|
|
|
|
pf: { type: String, required: true },
|
|
|
|
ppf: String,
|
|
|
|
CompletionTime: Date
|
2024-05-04 15:42:25 +02:00
|
|
|
});
|
|
|
|
|
2024-05-16 01:34:38 +02:00
|
|
|
const guildSchema = new Schema<IGuildDatabase>(
|
|
|
|
{
|
|
|
|
Name: { type: String, required: true },
|
|
|
|
DojoComponents: [dojoComponentSchema]
|
|
|
|
},
|
|
|
|
{ id: false }
|
|
|
|
);
|
2024-05-04 15:42:25 +02:00
|
|
|
|
2024-05-16 01:34:38 +02:00
|
|
|
export const Guild = model<IGuildDatabase>("Guild", guildSchema);
|