Skip to content

Commit 7f0d04f

Browse files
committed
Add system config model
1 parent 545a21e commit 7f0d04f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/models/schemas/System.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import mongoose from 'mongoose';
2+
const { Schema, model } = mongoose;
3+
4+
const SystemSchema = new Schema({
5+
_id: String,
6+
membership: {
7+
features: [],
8+
plans: [
9+
{
10+
_id: String,
11+
name: { type: String, required: true, unique: true },
12+
monthlyPrice: { type: Number, required: true },
13+
annualPrice: { type: Number, required: true },
14+
current: Boolean,
15+
available: Boolean,
16+
features: [
17+
{
18+
text: String,
19+
status: { type: String, enum: ['available', 'limited', 'unavailable'] },
20+
},
21+
],
22+
},
23+
],
24+
},
25+
});
26+
27+
export default model('System', SystemSchema);

0 commit comments

Comments
 (0)