@brimble/models 1.8.2 → 1.8.4
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/subscription.js +2 -2
- package/dist/types/member.d.ts +2 -2
- package/dist/types/subscription.d.ts +2 -2
- package/package.json +1 -1
- package/subscription.ts +2 -2
- package/types/member.ts +2 -2
- package/types/subscription.ts +2 -2
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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
-
import { SUBSCRIPTION_STATUS } from "../enum";
|
|
2
|
+
import { SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS } from "../enum";
|
|
3
3
|
import { IUser } from "./user";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
export interface ISubscription extends Document {
|
|
6
6
|
team_id: ITeam;
|
|
7
7
|
admin_id: IUser;
|
|
8
8
|
billable_id: IUser;
|
|
9
|
-
plan_type:
|
|
9
|
+
plan_type: SUBSCRIPTION_PLAN_TYPE;
|
|
10
10
|
status: SUBSCRIPTION_STATUS;
|
|
11
11
|
amount: number;
|
|
12
12
|
transaction_retries: number;
|
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);
|
package/types/member.ts
CHANGED
package/types/subscription.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
-
import { SUBSCRIPTION_STATUS } from "../enum";
|
|
2
|
+
import { SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS } from "../enum";
|
|
3
3
|
import { IUser } from "./user";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ export interface ISubscription extends Document {
|
|
|
7
7
|
team_id: ITeam;
|
|
8
8
|
admin_id: IUser;
|
|
9
9
|
billable_id: IUser;
|
|
10
|
-
plan_type:
|
|
10
|
+
plan_type: SUBSCRIPTION_PLAN_TYPE;
|
|
11
11
|
status: SUBSCRIPTION_STATUS;
|
|
12
12
|
amount: number;
|
|
13
13
|
transaction_retries: number;
|