Subscription + Seat
This commit is contained in:
parent
de8a3be3dd
commit
52d411f4c9
8
dist/Admin/Seat.d.ts
vendored
Normal file
8
dist/Admin/Seat.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import Resource from "../Resource";
|
||||||
|
import User from "../Notary/User";
|
||||||
|
import Subscription from "./Subscription";
|
||||||
|
export default class Seat extends Resource {
|
||||||
|
uid?: string;
|
||||||
|
user: User;
|
||||||
|
subscription: Subscription;
|
||||||
|
}
|
35
dist/Admin/Seat.js
vendored
Normal file
35
dist/Admin/Seat.js
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"use strict";
|
||||||
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const Resource_1 = __importDefault(require("../Resource"));
|
||||||
|
const class_transformer_1 = require("class-transformer");
|
||||||
|
const User_1 = __importDefault(require("../Notary/User"));
|
||||||
|
const Subscription_1 = __importDefault(require("./Subscription"));
|
||||||
|
class Seat extends Resource_1.default {
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
__metadata("design:type", String)
|
||||||
|
], Seat.prototype, "uid", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_transformer_1.Type)(() => User_1.default),
|
||||||
|
__metadata("design:type", User_1.default)
|
||||||
|
], Seat.prototype, "user", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_transformer_1.Type)(() => Subscription_1.default),
|
||||||
|
__metadata("design:type", Subscription_1.default)
|
||||||
|
], Seat.prototype, "subscription", void 0);
|
||||||
|
exports.default = Seat;
|
10
dist/Admin/Subscription.d.ts
vendored
Normal file
10
dist/Admin/Subscription.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import Resource from "../Resource";
|
||||||
|
import Office from "./Office";
|
||||||
|
export default class Subscription extends Resource {
|
||||||
|
uid?: string;
|
||||||
|
priceId: string;
|
||||||
|
start_date: Date;
|
||||||
|
end_date: Date;
|
||||||
|
nb_seats?: number;
|
||||||
|
office: Office;
|
||||||
|
}
|
54
dist/Admin/Subscription.js
vendored
Normal file
54
dist/Admin/Subscription.js
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
"use strict";
|
||||||
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||||
|
};
|
||||||
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const Resource_1 = __importDefault(require("../Resource"));
|
||||||
|
const class_transformer_1 = require("class-transformer");
|
||||||
|
const Office_1 = __importDefault(require("./Office"));
|
||||||
|
const class_validator_1 = require("class-validator");
|
||||||
|
class Subscription extends Resource_1.default {
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
__metadata("design:type", String)
|
||||||
|
], Subscription.prototype, "uid", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
__metadata("design:type", String)
|
||||||
|
], Subscription.prototype, "priceId", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "start_date is required",
|
||||||
|
}),
|
||||||
|
__metadata("design:type", Date)
|
||||||
|
], Subscription.prototype, "start_date", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_validator_1.IsNotEmpty)({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "end_date is required",
|
||||||
|
}),
|
||||||
|
__metadata("design:type", Date)
|
||||||
|
], Subscription.prototype, "end_date", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
__metadata("design:type", Number)
|
||||||
|
], Subscription.prototype, "nb_seats", void 0);
|
||||||
|
__decorate([
|
||||||
|
(0, class_transformer_1.Expose)(),
|
||||||
|
(0, class_transformer_1.Type)(() => Office_1.default),
|
||||||
|
__metadata("design:type", Office_1.default)
|
||||||
|
], Subscription.prototype, "office", void 0);
|
||||||
|
exports.default = Subscription;
|
17
src/Admin/Seat.ts
Normal file
17
src/Admin/Seat.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Resource from "../Resource";
|
||||||
|
import { Expose, Type } from "class-transformer";
|
||||||
|
import User from "../Notary/User";
|
||||||
|
import Subscription from "./Subscription";
|
||||||
|
|
||||||
|
export default class Seat extends Resource {
|
||||||
|
@Expose()
|
||||||
|
public uid?: string;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@Type(() => User)
|
||||||
|
public user!: User;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@Type(() => Subscription)
|
||||||
|
public subscription!: Subscription;
|
||||||
|
}
|
33
src/Admin/Subscription.ts
Normal file
33
src/Admin/Subscription.ts
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import Resource from "../Resource";
|
||||||
|
import { Expose, Type } from "class-transformer";
|
||||||
|
import Office from "./Office";
|
||||||
|
import { IsNotEmpty } from "class-validator";
|
||||||
|
|
||||||
|
export default class Subscription extends Resource {
|
||||||
|
@Expose()
|
||||||
|
public uid?: string;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
public priceId!: string;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@IsNotEmpty({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "start_date is required",
|
||||||
|
})
|
||||||
|
public start_date!: Date;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@IsNotEmpty({
|
||||||
|
groups: ["createSubscription"],
|
||||||
|
message: "end_date is required",
|
||||||
|
})
|
||||||
|
public end_date!: Date;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
public nb_seats?: number;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
@Type(() => Office)
|
||||||
|
public office!: Office;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user