Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mongoose = require('mongoose');
- const Schema = mongoose.Schema;
- const ReceiptSchema = new Schema({
- name: String,
- });
- const UserSchema = new Schema({
- username: { type: String, required: true, index: { unique: true } },
- password: { type: String, required: true },
- receipts: [ReceiptSchema],
- });
- module.exports = mongoose.model('User', UserSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement