mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
feat(Tx): Add timestamps to transaction schema (#1123)
This commit is contained in:
parent
af69763103
commit
8f328ec6a3
1 changed files with 33 additions and 28 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue