UNPKG

@sourceloop/ctrl-plane-subscription-service

Version:

Subscription management microservice for SaaS control plane.

88 lines 2.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Plan = void 0; const tslib_1 = require("tslib"); const repository_1 = require("@loopback/repository"); const core_1 = require("@sourceloop/core"); const billing_cycle_model_1 = require("./billing-cycle.model"); const currency_model_1 = require("./currency.model"); let Plan = class Plan extends core_1.UserModifiableEntity { constructor(data) { super(data); } }; exports.Plan = Plan; tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', id: true, generated: true, }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "id", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', description: 'name of the plan', required: true, }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "name", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', description: 'description of the plan', }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "description", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', required: true, description: 'Tier of the plan.', }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "tier", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', description: 'Size of the plan.', }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "size", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'number', required: true, }), tslib_1.__metadata("design:type", Number) ], Plan.prototype, "price", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'object', name: 'meta_data', description: 'Meta data of the plan', }), tslib_1.__metadata("design:type", Object) ], Plan.prototype, "metaData", void 0); tslib_1.__decorate([ (0, repository_1.belongsTo)(() => billing_cycle_model_1.BillingCycle, { keyTo: 'id', }, { name: 'billing_cycle_id', }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "billingCycleId", void 0); tslib_1.__decorate([ (0, repository_1.belongsTo)(() => currency_model_1.Currency, undefined, { name: 'currency_id', }), tslib_1.__metadata("design:type", String) ], Plan.prototype, "currencyId", void 0); exports.Plan = Plan = tslib_1.__decorate([ (0, repository_1.model)({ name: 'plans', }), tslib_1.__metadata("design:paramtypes", [Object]) ], Plan); //# sourceMappingURL=plan.model.js.map