Skip to content

Commit

Permalink
Merge branch 'master' into fix/#28
Browse files Browse the repository at this point in the history
  • Loading branch information
iampavangandhi authored Aug 24, 2020
2 parents aef0cde + 6926451 commit ac52fb8
Show file tree
Hide file tree
Showing 15 changed files with 668 additions and 2,698 deletions.
28 changes: 28 additions & 0 deletions models/Transaction.js
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
// Adding / Spending Balance History

const mongoose = require("mongoose");
var Float = require("mongoose-float").loadType(mongoose);

const TransactionSchema = new mongoose.Schema({
details: {
type: String,
required: true,
},
amount: {
type: Float,
required: true,
},
opration: {
type: String,
required: true
},
user: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
},
createdAt: {
type: Date,
default: Date.now,
},
});

module.exports = mongoose.model("Transaction", TransactionSchema);
Loading

0 comments on commit ac52fb8

Please sign in to comment.