@brimble/models 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/member.js +5 -2
- package/dist/subscription.js +2 -2
- package/dist/types/member.d.ts +2 -0
- package/member.ts +5 -2
- package/package.json +1 -1
- package/subscription.ts +2 -2
- package/types/member.ts +3 -1
package/dist/member.js
CHANGED
|
@@ -25,8 +25,11 @@ const memberSchema = new mongoose_1.Schema({
|
|
|
25
25
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
26
26
|
ref: "User",
|
|
27
27
|
},
|
|
28
|
-
permissions: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'MemberPermission' }]
|
|
28
|
+
permissions: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'MemberPermission' }],
|
|
29
29
|
}, {
|
|
30
|
-
timestamps:
|
|
30
|
+
timestamps: {
|
|
31
|
+
createdAt: "created_at",
|
|
32
|
+
updatedAt: "updated_at",
|
|
33
|
+
},
|
|
31
34
|
});
|
|
32
35
|
exports.default = (0, mongoose_1.model)("Member", memberSchema);
|
package/dist/subscription.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
|
-
const
|
|
5
|
+
const subscriptionSchema = new mongoose_1.Schema({
|
|
6
6
|
team_id: {
|
|
7
7
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
8
|
ref: "Team",
|
|
@@ -52,4 +52,4 @@ const subscriptionPlanSchema = new mongoose_1.Schema({
|
|
|
52
52
|
timestamps: true,
|
|
53
53
|
collection: "subscriptions",
|
|
54
54
|
});
|
|
55
|
-
exports.default = (0, mongoose_1.model)("Subscription",
|
|
55
|
+
exports.default = (0, mongoose_1.model)("Subscription", subscriptionSchema);
|
package/dist/types/member.d.ts
CHANGED
package/member.ts
CHANGED
|
@@ -26,10 +26,13 @@ const memberSchema: Schema = new Schema(
|
|
|
26
26
|
type: Schema.Types.ObjectId,
|
|
27
27
|
ref: "User",
|
|
28
28
|
},
|
|
29
|
-
permissions: [{ type: Schema.Types.ObjectId, ref: 'MemberPermission' }]
|
|
29
|
+
permissions: [{ type: Schema.Types.ObjectId, ref: 'MemberPermission' }],
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
timestamps:
|
|
32
|
+
timestamps: {
|
|
33
|
+
createdAt: "created_at",
|
|
34
|
+
updatedAt: "updated_at",
|
|
35
|
+
},
|
|
33
36
|
},
|
|
34
37
|
);
|
|
35
38
|
|
package/package.json
CHANGED
package/subscription.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { model, Schema } from "mongoose";
|
|
|
2
2
|
import {SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS} from "./enum";
|
|
3
3
|
import { ISubscription } from "./types";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const subscriptionSchema: Schema = new Schema(
|
|
6
6
|
{
|
|
7
7
|
team_id: {
|
|
8
8
|
type: Schema.Types.ObjectId,
|
|
@@ -56,4 +56,4 @@ const subscriptionPlanSchema: Schema = new Schema(
|
|
|
56
56
|
},
|
|
57
57
|
);
|
|
58
58
|
|
|
59
|
-
export default model<ISubscription>("Subscription",
|
|
59
|
+
export default model<ISubscription>("Subscription", subscriptionSchema);
|