Moved middleware/ & schemas/ into api/.
This commit is contained in:
20
api/schemas/Purchase.js
Normal file
20
api/schemas/Purchase.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const mongoose = require("mongoose");
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
const Purchase = new Schema({
|
||||
date: Date,
|
||||
blue: Number,
|
||||
red: Number,
|
||||
yellow: Number,
|
||||
green: Number,
|
||||
bought: Number,
|
||||
stolen: Number,
|
||||
wines: [
|
||||
{
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: "Wine"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("Purchase", Purchase);
|
||||
Reference in New Issue
Block a user