返回提交历史
Modified
src/models/inventoryModels/inventoryModel.ts
+24
-18
XFEstudio/XFESpaceNinjaServer
chore: remove unintended 'id' field in KubrowPetPrints and PersonalTechProjects (#3755)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3755 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
f349ec08
代码差异
1 个文件
+24
-18
@@ -593,16 +593,19 @@ const seasonChallengeHistorySchema = new Schema<ISeasonChallenge>(
593
593
{ _id: false }
594
594
);
595
595
596
const personalTechProjectSchema = new Schema<IPersonalTechProjectDatabase>({
597
State: Number,
598
ReqCredits: Number,
599
ItemType: String,
600
ProductCategory: String,
601
CategoryItemId: Schema.Types.ObjectId,
602
ReqItems: { type: [typeCountSchema], default: undefined },
603
HasContributions: Boolean,
604
CompletionDate: Date
605
});
596
const personalTechProjectSchema = new Schema<IPersonalTechProjectDatabase>(
597
{
598
State: Number,
599
ReqCredits: Number,
600
ItemType: String,
601
ProductCategory: String,
602
CategoryItemId: Schema.Types.ObjectId,
603
ReqItems: { type: [typeCountSchema], default: undefined },
604
HasContributions: Boolean,
605
CompletionDate: Date
606
},
607
{ id: false }
608
);
606
609
607
610
personalTechProjectSchema.virtual("ItemId").get(function () {
608
611
return { $oid: this._id.toString() };
@@ -1075,14 +1078,17 @@ const traitsSchema = new Schema<ITraits>(
1075
1078
{ _id: false }
1076
1079
);
1077
1080
1078
const kubrowPetPrintSchema = new Schema<IKubrowPetPrintDatabase>({
1079
ItemType: String,
1080
Name: String,
1081
IsMale: Boolean,
1082
Size: Number,
1083
DominantTraits: traitsSchema,
1084
RecessiveTraits: traitsSchema
1085
});
1081
const kubrowPetPrintSchema = new Schema<IKubrowPetPrintDatabase>(
1082
{
1083
ItemType: String,
1084
Name: String,
1085
IsMale: Boolean,
1086
Size: Number,
1087
DominantTraits: traitsSchema,
1088
RecessiveTraits: traitsSchema
1089
},
1090
{ id: false }
1091
);
1086
1092
kubrowPetPrintSchema.set("toJSON", {
1087
1093
virtuals: true,
1088
1094
transform(_doc, obj: Record<string, any>) {