Skip to content

Instantly share code, notes, and snippets.

@lobot
Created January 5, 2022 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lobot/c9a8f27e246c42983a8d308c79daaf86 to your computer and use it in GitHub Desktop.
Save lobot/c9a8f27e246c42983a8d308c79daaf86 to your computer and use it in GitHub Desktop.
sending-check-models-checks-js
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