添加gamerecord的allowMixed属性

This commit is contained in:
zhl 2021-01-13 20:51:13 +08:00
parent 4be37100a3
commit 024e03b3c4

View File

@ -3,7 +3,7 @@ import {
getModelForClass,
index,
modelOptions, mongoose,
prop
prop, Severity
} from "@typegoose/typegoose";
import {Base, TimeStamps} from "@typegoose/typegoose/lib/defaultClasses";
@ -36,7 +36,8 @@ class GamePlayer {
@index({'players.accountid': 1}, {unique: false})
@modelOptions({
schemaOptions:
{collection: "game_record", timestamps: true}
{collection: "game_record", timestamps: true},
options: {allowMixed: Severity.ALLOW}
})
class GameRecordClass extends Base<string>{
@prop()