feat(Tx): Add timestamps to transaction schema (#1123)

This commit is contained in:
Danny Avila 2023-10-30 09:41:07 -04:00 committed by GitHub
parent af69763103
commit 8f328ec6a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
const mongoose = require('mongoose'); const mongoose = require('mongoose');
const transactionSchema = mongoose.Schema({ const transactionSchema = mongoose.Schema(
{
user: { user: {
type: mongoose.Schema.Types.ObjectId, type: mongoose.Schema.Types.ObjectId,
ref: 'User', ref: 'User',
@ -29,6 +30,10 @@ const transactionSchema = mongoose.Schema({
rate: Number, rate: Number,
rawAmount: Number, rawAmount: Number,
tokenValue: Number, tokenValue: Number,
}); },
{
timestamps: true,
},
);
module.exports = transactionSchema; module.exports = transactionSchema;