idea-toolbox
Version:
IDEA's utility functions
30 lines (29 loc) • 1.26 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectSubscription = void 0;
const resource_model_1 = require("./resource.model");
const membership_model_1 = require("./membership.model");
/**
* Table: `idea_projects_subscriptions`.
*
* Indexes:
* - `project-validUntil-index` (LSI - all).
* - `project-planId-index` (LSI - all).
* - `project-storeReferenceId-index` (LSI - all).
*/
class ProjectSubscription extends resource_model_1.Resource {
load(x) {
super.load(x);
this.project = this.clean(x.project, String);
this.subscriptionId = this.clean(x.subscriptionId, String);
this.planId = this.clean(x.planId, String);
this.validUntil = this.clean(x.validUntil, a => new Date(a).getTime());
this.autoRenewing = this.clean(x.autoRenewing, Boolean);
this.platform = this.clean(x.platform, String);
this.storePlanId = this.clean(x.storePlanId, String);
this.storeReferenceId = this.clean(x.storeReferenceId, String);
this.storeReceipt = this.clean(x.storeReceipt, String);
this.managedByUser = new membership_model_1.MembershipSummary(x.managedByUser);
}
}
exports.ProjectSubscription = ProjectSubscription;