Skip to content
Snippets Groups Projects
Commit 5394dbf5 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Create download model

parent d3492707
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const libs = `${process.cwd()}/libs`;
const log = require(`${libs}/log`)(module);
const User = require(`${libs}/models/user`);
let Download = new Schema({
userId: {
type: Schema.Types.ObjectId,
required: true,
ref: 'User'
},
table: {
type: String,
required: true
},
mappingTable: {
type: String,
required: true
},
query: {
type: String,
required: true
},
createdAt: {
type: Date,
required: true,
default: Date.now
},
updatedAt: {
type: Date,
required: true,
default: Date.now
}
});
module.exports = mongoose.model('Download', Download);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment