Added subscription type
This commit is contained in:
parent
f0e4ad9f4c
commit
d05530584c
5
dist/Admin/Subscription.d.ts
vendored
5
dist/Admin/Subscription.d.ts
vendored
@ -4,9 +4,14 @@ import Seat from "./Seat";
|
|||||||
export default class Subscription extends Resource {
|
export default class Subscription extends Resource {
|
||||||
uid?: string;
|
uid?: string;
|
||||||
priceId: string;
|
priceId: string;
|
||||||
|
type: EType | string;
|
||||||
start_date: Date;
|
start_date: Date;
|
||||||
end_date: Date;
|
end_date: Date;
|
||||||
nb_seats?: number;
|
nb_seats?: number;
|
||||||
office: Office;
|
office: Office;
|
||||||
seats?: Seat[];
|
seats?: Seat[];
|
||||||
}
|
}
|
||||||
|
export declare enum EType {
|
||||||
|
Standard = "STANDARD",
|
||||||
|
Unlimited = "UNLIMITED"
|
||||||
|
}
|
||||||
|
22
dist/Admin/Subscription.js
vendored
22
dist/Admin/Subscription.js
vendored
@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.EType = void 0;
|
||||||
const Resource_1 = __importDefault(require("../Resource"));
|
const Resource_1 = __importDefault(require("../Resource"));
|
||||||
const class_transformer_1 = require("class-transformer");
|
const class_transformer_1 = require("class-transformer");
|
||||||
const Office_1 = __importDefault(require("./Office"));
|
const Office_1 = __importDefault(require("./Office"));
|
||||||
@ -25,8 +26,20 @@ __decorate([
|
|||||||
], Subscription.prototype, "uid", void 0);
|
], Subscription.prototype, "uid", void 0);
|
||||||
__decorate([
|
__decorate([
|
||||||
(0, class_transformer_1.Expose)(),
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "priceId is required",
|
||||||
|
}),
|
||||||
__metadata("design:type", String)
|
__metadata("design:type", String)
|
||||||
], Subscription.prototype, "priceId", void 0);
|
], Subscription.prototype, "priceId", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "type is required",
|
||||||
|
}),
|
||||||
|
__metadata("design:type", String)
|
||||||
|
], Subscription.prototype, "type", void 0);
|
||||||
__decorate([
|
__decorate([
|
||||||
(0, class_transformer_1.Expose)(),
|
(0, class_transformer_1.Expose)(),
|
||||||
(0, class_validator_1.IsNotEmpty)({
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
@ -50,6 +63,10 @@ __decorate([
|
|||||||
__decorate([
|
__decorate([
|
||||||
(0, class_transformer_1.Expose)(),
|
(0, class_transformer_1.Expose)(),
|
||||||
(0, class_transformer_1.Type)(() => Office_1.default),
|
(0, class_transformer_1.Type)(() => Office_1.default),
|
||||||
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "office is required",
|
||||||
|
}),
|
||||||
__metadata("design:type", Office_1.default)
|
__metadata("design:type", Office_1.default)
|
||||||
], Subscription.prototype, "office", void 0);
|
], Subscription.prototype, "office", void 0);
|
||||||
__decorate([
|
__decorate([
|
||||||
@ -58,3 +75,8 @@ __decorate([
|
|||||||
__metadata("design:type", Array)
|
__metadata("design:type", Array)
|
||||||
], Subscription.prototype, "seats", void 0);
|
], Subscription.prototype, "seats", void 0);
|
||||||
exports.default = Subscription;
|
exports.default = Subscription;
|
||||||
|
var EType;
|
||||||
|
(function (EType) {
|
||||||
|
EType["Standard"] = "STANDARD";
|
||||||
|
EType["Unlimited"] = "UNLIMITED";
|
||||||
|
})(EType = exports.EType || (exports.EType = {}));
|
||||||
|
@ -9,8 +9,19 @@ export default class Subscription extends Resource {
|
|||||||
public uid?: string;
|
public uid?: string;
|
||||||
|
|
||||||
@Expose()
|
@Expose()
|
||||||
|
@IsNotEmpty({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "priceId is required",
|
||||||
|
})
|
||||||
public priceId!: string;
|
public priceId!: string;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@IsNotEmpty({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "type is required",
|
||||||
|
})
|
||||||
|
public type!: EType | string;
|
||||||
|
|
||||||
@Expose()
|
@Expose()
|
||||||
@IsNotEmpty({
|
@IsNotEmpty({
|
||||||
groups: ["createSubscription"],
|
groups: ["createSubscription"],
|
||||||
@ -30,9 +41,18 @@ export default class Subscription extends Resource {
|
|||||||
|
|
||||||
@Expose()
|
@Expose()
|
||||||
@Type(() => Office)
|
@Type(() => Office)
|
||||||
|
@IsNotEmpty({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "office is required",
|
||||||
|
})
|
||||||
public office!: Office;
|
public office!: Office;
|
||||||
|
|
||||||
@Expose()
|
@Expose()
|
||||||
@Type(() => Seat)
|
@Type(() => Seat)
|
||||||
public seats?: Seat[];
|
public seats?: Seat[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum EType {
|
||||||
|
Standard = "STANDARD",
|
||||||
|
Unlimited = "UNLIMITED",
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user