feat: more work on clans #214

Merged
Sainan merged 7 commits from clan-ii into main 2024-05-15 16:34:38 -07:00
Showing only changes of commit e066f0f23f - Show all commits

View File

@ -2,14 +2,18 @@ import { IGuild } from "@/src/types/guildTypes";
import { model, Schema } from "mongoose";
import { toOid } from "@/src/helpers/inventoryHelpers";
const guildSchema = new Schema<IGuild>({
Name: { type: String, required: true }
});
const guildSchema = new Schema<IGuild>(
{
Name: { type: String, required: true }
},
{ id: false }
);
guildSchema.set("toJSON", {
virtuals: true,
transform(_document, guild) {
guild._id = toOid(guild._id);
delete guild.__v;
}
});