Created
January 5, 2022 22:56
-
-
Save lobot/c9a8f27e246c42983a8d308c79daaf86 to your computer and use it in GitHub Desktop.
sending-check-models-checks-js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const Schema = mongoose.Schema; | |
// Check schema definition | |
const CheckSchema = new Schema( | |
{ | |
checkId: { type: String, required: true }, | |
description: { type: String, default: null }, | |
to: { type: Schema.Types.Mixed, default: null }, | |
from: { type: Schema.Types.Mixed, default: null }, | |
bank_account: { type: String, default: null }, | |
amount: { type: Number, default: null } | |
}, { timestamps: true } | |
); | |
// Exports the CheckSchema for use elsewhere. | |
module.exports = mongoose.model("Check", CheckSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment