1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-14 00:46:38 -05:00
shimapan/app/models/Key.js

41 lines
622 B
JavaScript

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