物品兑换增加扩展字段

This commit is contained in:
yulixing 2019-08-30 11:53:19 +08:00
parent 5335b092a3
commit be2bfa3b0e
2 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,7 @@ router.post('/list', async (req, res, next) => {
type: body.type,
time: body.time,
cfg: cfg,
extraData: body.extraData
})
const result = await list.save()
res.send({
@ -183,6 +184,7 @@ router.put('/list', async (req, res, next) => {
type: body.type,
time: body.time,
cfg: cfg,
extraData: body.extraData
}
)
res.send({

View File

@ -38,6 +38,7 @@ const GiftListSchema = new mongoose.Schema(
time: {type: String}, // 填写的发放配置
cfg: {type: Array, default: []}, // 生成的配置
deleted: {type: Boolean, default: false},
extraData: {type: String, default: ''} //用于扩展
},
{
collection: 'gift_list',