-
-
Save BassOfBass/411992b45c57933b850b3e9135da0a3a to your computer and use it in GitHub Desktop.
Invite model
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
Invite { | |
code: String, | |
expirationDate: Date, | |
usesLeft: Number, | |
/** | |
* The person creating the invite. | |
*/ | |
creator: { | |
type: Schema.Types.ObjectId, | |
ref: "User" | |
}, | |
/** | |
* All users who entered the invite. | |
*/ | |
guests: [{ | |
type: Schema.Types.ObjectId, | |
ref: "User" | |
}], | |
}, { timestamps: true } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment