[Member] fix -> make id required

This commit is contained in:
Flam3rboy
2021-02-22 22:15:40 +01:00
parent 92a6c981ce
commit 371a568596
3 changed files with 10 additions and 8 deletions
+5 -4
View File
@@ -47,7 +47,7 @@ const MuteConfig = {
};
export const MemberSchema = new Schema({
id: Types.Long,
id: { type: Types.Long, required: true },
guild_id: Types.Long,
nick: String,
roles: [Types.Long],
@@ -75,10 +75,11 @@ export const MemberSchema = new Schema({
},
});
MemberSchema.virtual("user", {
model: UserModel,
localField: "user",
exports.MemberSchema.virtual("user", {
ref: UserModel,
localField: "id",
foreignField: "id",
justOne: true,
});
// @ts-ignore