summaryrefslogtreecommitdiff
path: root/server/lib/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schemas')
-rw-r--r--server/lib/schemas/Subscription.js6
-rw-r--r--server/lib/schemas/User.js1
2 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/schemas/Subscription.js b/server/lib/schemas/Subscription.js
index 8315009..8ec557d 100644
--- a/server/lib/schemas/Subscription.js
+++ b/server/lib/schemas/Subscription.js
@@ -17,6 +17,12 @@ var SubscriptionSchema = new mongoose.Schema({
monthly: { type: Boolean },
}],
+ history: [{
+ action: { type: String },
+ plan_id: { type: String },
+ created_at: { type: Date, default: Date.now },
+ }],
+
created_at: { type: Date, default: Date.now },
updated_at: { type: Date, default: Date.now },
})
diff --git a/server/lib/schemas/User.js b/server/lib/schemas/User.js
index 180a140..19b5ede 100644
--- a/server/lib/schemas/User.js
+++ b/server/lib/schemas/User.js
@@ -62,6 +62,7 @@ var UserSchema = new mongoose.Schema({
twitterName: { type: String, default: "" },
facebookUrl: { type: String, default: "" },
isStaff: { type: Boolean, default: false },
+ subscription_id: { type: mongoose.Schema.ObjectId },
created_at: { type: Date },
updated_at: { type: Date },
last_seen: { type: Date },