whitelabel-db 1.0.29 → 1.0.30
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/models/Booking.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Project } from './Project';
|
|
2
3
|
export declare class Booking extends Model<Partial<Booking>> {
|
|
3
4
|
id: string;
|
|
4
5
|
prebookId: string;
|
|
@@ -6,6 +7,7 @@ export declare class Booking extends Model<Partial<Booking>> {
|
|
|
6
7
|
liteApiBookingData?: object;
|
|
7
8
|
bookingInputData?: object;
|
|
8
9
|
projectId?: string;
|
|
10
|
+
project?: Project;
|
|
9
11
|
hasAcceptedTerms?: boolean;
|
|
10
12
|
liteApiCancelBookingData?: object;
|
|
11
13
|
paymentStatus?: string;
|
package/dist/models/Booking.js
CHANGED
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Booking = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const Project_1 = require("./Project");
|
|
14
15
|
let Booking = class Booking extends sequelize_typescript_1.Model {
|
|
15
16
|
};
|
|
16
17
|
exports.Booking = Booking;
|
|
@@ -58,12 +59,18 @@ __decorate([
|
|
|
58
59
|
__metadata("design:type", Object)
|
|
59
60
|
], Booking.prototype, "bookingInputData", void 0);
|
|
60
61
|
__decorate([
|
|
62
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Project_1.Project),
|
|
63
|
+
sequelize_typescript_1.Index,
|
|
61
64
|
(0, sequelize_typescript_1.Column)({
|
|
62
65
|
type: sequelize_typescript_1.DataType.UUID,
|
|
63
66
|
allowNull: false,
|
|
64
67
|
}),
|
|
65
68
|
__metadata("design:type", String)
|
|
66
69
|
], Booking.prototype, "projectId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Project_1.Project),
|
|
72
|
+
__metadata("design:type", Project_1.Project)
|
|
73
|
+
], Booking.prototype, "project", void 0);
|
|
67
74
|
__decorate([
|
|
68
75
|
(0, sequelize_typescript_1.Column)({
|
|
69
76
|
type: sequelize_typescript_1.DataType.BOOLEAN,
|
package/dist/models/Project.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { Agency } from './Agency';
|
|
3
3
|
import { LiteApiClient } from '../libs/liteapi';
|
|
4
|
+
import { Booking } from './Booking';
|
|
4
5
|
export declare class Project extends Model<Partial<Project>> {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -9,6 +10,7 @@ export declare class Project extends Model<Partial<Project>> {
|
|
|
9
10
|
settings?: object;
|
|
10
11
|
agencyId?: string;
|
|
11
12
|
agency?: Agency;
|
|
13
|
+
bookings?: Booking[];
|
|
12
14
|
generateSession(secret: string): string;
|
|
13
15
|
getLiteApiClient(): LiteApiClient;
|
|
14
16
|
}
|
package/dist/models/Project.js
CHANGED
|
@@ -17,6 +17,7 @@ const sequelize_typescript_1 = require("sequelize-typescript");
|
|
|
17
17
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
18
18
|
const Agency_1 = require("./Agency");
|
|
19
19
|
const liteapi_1 = require("../libs/liteapi");
|
|
20
|
+
const Booking_1 = require("./Booking");
|
|
20
21
|
const clients = {};
|
|
21
22
|
let Project = class Project extends sequelize_typescript_1.Model {
|
|
22
23
|
generateSession(secret) {
|
|
@@ -96,6 +97,10 @@ __decorate([
|
|
|
96
97
|
(0, sequelize_typescript_1.BelongsTo)(() => Agency_1.Agency),
|
|
97
98
|
__metadata("design:type", Agency_1.Agency)
|
|
98
99
|
], Project.prototype, "agency", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, sequelize_typescript_1.HasMany)(() => Booking_1.Booking),
|
|
102
|
+
__metadata("design:type", Array)
|
|
103
|
+
], Project.prototype, "bookings", void 0);
|
|
99
104
|
exports.Project = Project = __decorate([
|
|
100
105
|
(0, sequelize_typescript_1.Table)({
|
|
101
106
|
tableName: 'projects',
|