feat: limit export kb

This commit is contained in:
archer
2023-05-22 14:14:06 +08:00
parent 5128bbcce4
commit 1c8db69a5a
4 changed files with 43 additions and 7 deletions

View File

@@ -16,6 +16,10 @@ const UserSchema = new Schema({
get: (val: string) => hashPassword(val),
select: false
},
createTime: {
type: Date,
default: () => new Date()
},
avatar: {
type: String,
default: '/icon/human.png'
@@ -41,9 +45,11 @@ const UserSchema = new Schema({
type: String,
default: ''
},
createTime: {
type: Date,
default: () => new Date()
limit: {
exportKbTime: {
// Every half hour
type: Date
}
}
});