mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-15 02:07:50 -05:00
adding Admin server
This commit is contained in:
23
account/server/models/plan.js
Normal file
23
account/server/models/plan.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// Defining a User Model in mongoose
|
||||
// Code modified from https://github.com/sahat/hackathon-starter
|
||||
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
|
||||
var SubscriptionSchema = mongoose.Schema({ subscriptionItemId: String, quantity: {type: Number, default: 0}, systems: [String] });
|
||||
const PlanSchema = new mongoose.Schema({
|
||||
|
||||
userId: mongoose.Schema.Types.ObjectId,
|
||||
userPlan: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
subscriptionId: String,
|
||||
proSystemSubscription: SubscriptionSchema
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = mongoose.model("Plan", PlanSchema)
|
||||
Reference in New Issue
Block a user