thinkjs / thinkjs

Use full ES2015+ features to develop Node.js applications, Support TypeScript.
https://thinkjs.org/
MIT License
5.31k stars 616 forks source link

建议thinkjs的mongodb的model支持expires属性定义 #272

Closed arden closed 6 years ago

arden commented 8 years ago
updatedAt: {
    // 到时候只要更新这个更新时间就可以保证Session不过期
    type: Date,
    default: Date.now,
    expires: config[config.env].session.ttl
}

现在mongodb支持类似于redis的expires过期时间设置,强烈建议thinkjs的mongodb的model定义也能够支持这种expires的过期时间设置。

vvhh2002 commented 8 years ago

+1

lizheming commented 6 years ago

Close this issue due to long no activity.