web-server 注册、登录、获取服务器列表;game-server token 校验

This commit is contained in:
liangtongchuan
2020-08-19 14:40:11 +08:00
parent 0458817b51
commit 940879016f
32 changed files with 1144 additions and 38 deletions

View File

@@ -0,0 +1,24 @@
import { prop, pre } from '@typegoose/typegoose';
/**
* BaseModel
*/
@pre<BaseModel>('save', function (next) {
if (!this.createdAt || this.isNew) {
this.createdAt = this.updatedAt = new Date()
} else {
this.updatedAt = new Date()
}
next()
})
export default class BaseModel {
_id?: string
@prop()
createdAt: Date
@prop()
updatedAt: Date
}