1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-10 23:53:31 -05:00
shimapan/app/models/Key.js

41 lines
622 B
JavaScript
Raw Normal View History

const mongoose = require('mongoose');
const KeySchema = mongoose.Schema({
key: {
type: String,
unique: true,
required: true
},
2017-10-18 13:31:08 -04:00
identifier: {
type: String,
required: true
},
scope: {
type: [String],
required: true,
},
2017-10-18 13:31:08 -04:00
uploadCount: {
type: Number,
default: 0
},
2017-10-18 13:31:08 -04:00
uploadSize: {
type: Number,
default: 0
},
issuer: {
type: String,
required: true
},
date: {
type: Date,
default: Date.now
}
2017-10-18 13:31:08 -04:00
});
module.exports = mongoose.model('Key', KeySchema);