Skip to content

Commit

Permalink
Creación tabla historial
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSantamarina committed Mar 6, 2024
1 parent 49fc38c commit 3bbb82c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions users/userservice/database/history-model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const mongoose = require('mongoose');

const historySchema = new mongoose.Schema({
total_correct_answers: {
type: Number,
required: true,
},
total_failed_answers: {
type: Number,
required: true,
},
total_punctuation: {
type: Number,
required: true,
},
total_time: {
type: TimeStamp,
required: true,
},
user: {
type: User,
required: true,
},
});

const History = mongoose.model('History', historySchema, 'History');

module.exports = History

0 comments on commit 3bbb82c

Please sign in to comment.