Created
July 24, 2021 15:54
-
-
Save ghaffaru/33be3fda2d80574bb9076f5b7b5bbeb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 PaymentSchema = mongoose.Schema({ | |
| userKey: { | |
| type: String, | |
| required: true | |
| }, | |
| eventKey: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "Event", | |
| required: true | |
| }, | |
| amount: { | |
| type: Number, | |
| required: true | |
| }, | |
| reference: { | |
| type: String, | |
| required: true | |
| }, | |
| paid: { | |
| type: Boolean, | |
| default: false | |
| }, | |
| createdAt: { | |
| type: Date, | |
| default: Date.now | |
| } | |
| }); | |
| module.exports = mongoose.model('Payment', PaymentSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment