whitelabel-db 1.1.99 → 1.2.1
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/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/libs/database.js +2 -0
- package/dist/migrations/026-add-hotel-bookings-last-30-days.d.ts +3 -0
- package/dist/migrations/026-add-hotel-bookings-last-30-days.js +40 -0
- package/dist/migrations/027-create-deleted-hotels-table.d.ts +3 -0
- package/dist/migrations/027-create-deleted-hotels-table.js +57 -0
- package/dist/models/DeletedHotel.d.ts +19 -0
- package/dist/models/DeletedHotel.js +194 -0
- package/dist/models/Hotel.d.ts +1 -0
- package/dist/models/Hotel.js +8 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { Creator } from './models/Creator';
|
|
|
25
25
|
export { Collection, CollectionStatus } from './models/Collection';
|
|
26
26
|
export { CollectionItem, CollectionType } from './models/CollectionItem';
|
|
27
27
|
export { CollectionItemCustomField } from './models/CollectionItemCustomField';
|
|
28
|
+
export { DeletedHotel } from './models/DeletedHotel';
|
|
28
29
|
export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
|
|
29
30
|
export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, PromoCodeRequest, PromoCodeResponse, EsimplyPackage, Addon, AddonResponse, } from './libs/liteapiv3';
|
|
30
31
|
export { LiteApiUser, LiteApiUserRequest } from './libs/liteapiuser';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LiteApiUser = exports.LiteApiClientV3 = exports.LiteApiClient = exports.CollectionItemCustomField = exports.CollectionType = exports.CollectionItem = exports.CollectionStatus = exports.Collection = exports.Creator = exports.AmenityTranslation = exports.RoomAmenity = exports.Amenity = exports.FacilityTranslation = exports.HotelFacility = exports.Facility = exports.AnalyticsSummary = exports.HotelRate = exports.Feedback = exports.Referral = exports.HotelAccessibility = exports.Guest = exports.HotelTranslation = exports.Role = exports.Booking = exports.Project = exports.User = exports.Hotel = exports.Country = exports.City = exports.Agency = exports.runMigrations = exports.connect = void 0;
|
|
3
|
+
exports.LiteApiUser = exports.LiteApiClientV3 = exports.LiteApiClient = exports.DeletedHotel = exports.CollectionItemCustomField = exports.CollectionType = exports.CollectionItem = exports.CollectionStatus = exports.Collection = exports.Creator = exports.AmenityTranslation = exports.RoomAmenity = exports.Amenity = exports.FacilityTranslation = exports.HotelFacility = exports.Facility = exports.AnalyticsSummary = exports.HotelRate = exports.Feedback = exports.Referral = exports.HotelAccessibility = exports.Guest = exports.HotelTranslation = exports.Role = exports.Booking = exports.Project = exports.User = exports.Hotel = exports.Country = exports.City = exports.Agency = exports.runMigrations = exports.connect = void 0;
|
|
4
4
|
var database_1 = require("./libs/database");
|
|
5
5
|
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return database_1.connect; } });
|
|
6
6
|
var migration_1 = require("./libs/migration");
|
|
@@ -59,6 +59,8 @@ Object.defineProperty(exports, "CollectionItem", { enumerable: true, get: functi
|
|
|
59
59
|
Object.defineProperty(exports, "CollectionType", { enumerable: true, get: function () { return CollectionItem_1.CollectionType; } });
|
|
60
60
|
var CollectionItemCustomField_1 = require("./models/CollectionItemCustomField");
|
|
61
61
|
Object.defineProperty(exports, "CollectionItemCustomField", { enumerable: true, get: function () { return CollectionItemCustomField_1.CollectionItemCustomField; } });
|
|
62
|
+
var DeletedHotel_1 = require("./models/DeletedHotel");
|
|
63
|
+
Object.defineProperty(exports, "DeletedHotel", { enumerable: true, get: function () { return DeletedHotel_1.DeletedHotel; } });
|
|
62
64
|
var liteapi_1 = require("./libs/liteapi");
|
|
63
65
|
Object.defineProperty(exports, "LiteApiClient", { enumerable: true, get: function () { return liteapi_1.LiteApiClient; } });
|
|
64
66
|
var liteapiv3_1 = require("./libs/liteapiv3");
|
package/dist/libs/database.js
CHANGED
|
@@ -36,6 +36,7 @@ const Creator_1 = require("../models/Creator");
|
|
|
36
36
|
const Collection_1 = require("../models/Collection");
|
|
37
37
|
const CollectionItem_1 = require("../models/CollectionItem");
|
|
38
38
|
const CollectionItemCustomField_1 = require("../models/CollectionItemCustomField");
|
|
39
|
+
const DeletedHotel_1 = require("../models/DeletedHotel");
|
|
39
40
|
const migration_1 = require("./migration");
|
|
40
41
|
const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
42
|
const connection = new sequelize_typescript_1.Sequelize({
|
|
@@ -71,6 +72,7 @@ const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, functio
|
|
|
71
72
|
Collection_1.Collection,
|
|
72
73
|
CollectionItem_1.CollectionItem,
|
|
73
74
|
CollectionItemCustomField_1.CollectionItemCustomField,
|
|
75
|
+
DeletedHotel_1.DeletedHotel,
|
|
74
76
|
],
|
|
75
77
|
});
|
|
76
78
|
try {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.down = exports.up = void 0;
|
|
13
|
+
// Purpose: Add bookingsLast30Days column to static_hotels table.
|
|
14
|
+
const sequelize_1 = require("sequelize");
|
|
15
|
+
const up = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
try {
|
|
17
|
+
// Add bookingsLast30Days column
|
|
18
|
+
yield queryInterface.addColumn('static_hotels', 'bookingsLast30Days', {
|
|
19
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
20
|
+
allowNull: true,
|
|
21
|
+
defaultValue: 0,
|
|
22
|
+
});
|
|
23
|
+
console.log('bookingsLast30Days column added successfully.');
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error('Error while adding bookingsLast30Days column:', error.message);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
exports.up = up;
|
|
30
|
+
const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
// Remove bookingsLast30Days column
|
|
33
|
+
yield queryInterface.removeColumn('static_hotels', 'bookingsLast30Days');
|
|
34
|
+
console.log('bookingsLast30Days column removed successfully.');
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error('Error while removing bookingsLast30Days column:', error.message);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
exports.down = down;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.down = exports.up = void 0;
|
|
13
|
+
const up = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
try {
|
|
15
|
+
// Add indexes for better query performance
|
|
16
|
+
yield queryInterface.addIndex('deleted_hotels', ['hotelId'], {
|
|
17
|
+
name: 'idx_deleted_hotels_hotel_id',
|
|
18
|
+
});
|
|
19
|
+
yield queryInterface.addIndex('deleted_hotels', ['newHotelId'], {
|
|
20
|
+
name: 'idx_deleted_hotels_new_hotel_id',
|
|
21
|
+
});
|
|
22
|
+
yield queryInterface.addIndex('deleted_hotels', ['isActive'], {
|
|
23
|
+
name: 'idx_deleted_hotels_is_active',
|
|
24
|
+
});
|
|
25
|
+
yield queryInterface.addIndex('deleted_hotels', ['deletedAt'], {
|
|
26
|
+
name: 'idx_deleted_hotels_deleted_at',
|
|
27
|
+
});
|
|
28
|
+
// Add composite index for common queries
|
|
29
|
+
yield queryInterface.addIndex('deleted_hotels', ['hotelId', 'isActive'], {
|
|
30
|
+
name: 'idx_deleted_hotels_hotel_id_active',
|
|
31
|
+
});
|
|
32
|
+
yield queryInterface.addIndex('deleted_hotels', ['hotelId', 'deletedAt'], {
|
|
33
|
+
name: 'idx_deleted_hotels_hotel_id_deleted_at',
|
|
34
|
+
});
|
|
35
|
+
console.log('deleted_hotels table and indexes created successfully.');
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error('Error while creating deleted_hotels table:', error.message);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.up = up;
|
|
42
|
+
const down = (queryInterface) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
// Drop the indexes
|
|
45
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_hotel_id');
|
|
46
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_new_hotel_id');
|
|
47
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_is_active');
|
|
48
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_deleted_at');
|
|
49
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_hotel_id_active');
|
|
50
|
+
yield queryInterface.removeIndex('deleted_hotels', 'idx_deleted_hotels_hotel_id_deleted_at');
|
|
51
|
+
console.log('deleted_hotels indexes dropped successfully.');
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.error('Error while dropping deleted_hotels indexes:', error.message);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
exports.down = down;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
export declare class DeletedHotel extends Model<Partial<DeletedHotel>> {
|
|
3
|
+
id: number;
|
|
4
|
+
hotelId: string;
|
|
5
|
+
newHotelId?: string;
|
|
6
|
+
reason?: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
deletedAt?: Date;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
static softDeleteHotel(hotelId: string, reason?: string): Promise<DeletedHotel>;
|
|
12
|
+
static redirectHotel(hotelId: string, newHotelId: string, reason?: string): Promise<DeletedHotel>;
|
|
13
|
+
static getActiveRedirection(hotelId: string): Promise<DeletedHotel | null>;
|
|
14
|
+
static isHotelDeleted(hotelId: string): Promise<boolean>;
|
|
15
|
+
static restoreHotel(hotelId: string): Promise<boolean>;
|
|
16
|
+
static isHotelRedirected(hotelId: string): Promise<boolean>;
|
|
17
|
+
static isHotelCompletelyDeleted(hotelId: string): Promise<boolean>;
|
|
18
|
+
static getRedirectTarget(hotelId: string): Promise<string | null>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.DeletedHotel = void 0;
|
|
22
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
23
|
+
const sequelize_1 = require("sequelize");
|
|
24
|
+
let DeletedHotel = class DeletedHotel extends sequelize_typescript_1.Model {
|
|
25
|
+
// Helper methods for soft delete functionality
|
|
26
|
+
static softDeleteHotel(hotelId, reason) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield this.create({
|
|
29
|
+
hotelId,
|
|
30
|
+
newHotelId: undefined,
|
|
31
|
+
reason: reason || 'Hotel soft deleted',
|
|
32
|
+
isActive: true,
|
|
33
|
+
deletedAt: new Date(),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
static redirectHotel(hotelId, newHotelId, reason) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return yield this.create({
|
|
40
|
+
hotelId,
|
|
41
|
+
newHotelId,
|
|
42
|
+
reason: reason || 'Hotel redirected',
|
|
43
|
+
isActive: true,
|
|
44
|
+
deletedAt: undefined, // Not deleted, just redirected
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
static getActiveRedirection(hotelId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this.findOne({
|
|
51
|
+
where: {
|
|
52
|
+
hotelId,
|
|
53
|
+
isActive: true,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
static isHotelDeleted(hotelId) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const record = yield this.findOne({
|
|
61
|
+
where: {
|
|
62
|
+
hotelId,
|
|
63
|
+
isActive: true,
|
|
64
|
+
deletedAt: { [sequelize_1.Op.ne]: null },
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
return !!record;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
static restoreHotel(hotelId) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const [affectedRows] = yield this.update({ isActive: false }, {
|
|
73
|
+
where: {
|
|
74
|
+
hotelId,
|
|
75
|
+
isActive: true,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
return affectedRows > 0;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Additional helper methods for different scenarios
|
|
82
|
+
static isHotelRedirected(hotelId) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const record = yield this.findOne({
|
|
85
|
+
where: {
|
|
86
|
+
hotelId,
|
|
87
|
+
isActive: true,
|
|
88
|
+
newHotelId: { [sequelize_1.Op.ne]: null },
|
|
89
|
+
deletedAt: null,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
return !!record;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
static isHotelCompletelyDeleted(hotelId) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const record = yield this.findOne({
|
|
98
|
+
where: {
|
|
99
|
+
hotelId,
|
|
100
|
+
isActive: true,
|
|
101
|
+
newHotelId: null,
|
|
102
|
+
deletedAt: { [sequelize_1.Op.ne]: null },
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
return !!record;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
static getRedirectTarget(hotelId) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const record = yield this.findOne({
|
|
111
|
+
where: {
|
|
112
|
+
hotelId,
|
|
113
|
+
isActive: true,
|
|
114
|
+
newHotelId: { [sequelize_1.Op.ne]: null },
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
return (record === null || record === void 0 ? void 0 : record.newHotelId) || null;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports.DeletedHotel = DeletedHotel;
|
|
122
|
+
__decorate([
|
|
123
|
+
sequelize_typescript_1.PrimaryKey,
|
|
124
|
+
(0, sequelize_typescript_1.Column)({
|
|
125
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
|
126
|
+
autoIncrement: true,
|
|
127
|
+
allowNull: false,
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], DeletedHotel.prototype, "id", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
sequelize_typescript_1.Index,
|
|
133
|
+
(0, sequelize_typescript_1.Column)({
|
|
134
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
135
|
+
allowNull: false,
|
|
136
|
+
comment: 'The ID of the deleted/old hotel',
|
|
137
|
+
}),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], DeletedHotel.prototype, "hotelId", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
sequelize_typescript_1.Index,
|
|
142
|
+
(0, sequelize_typescript_1.Column)({
|
|
143
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
144
|
+
allowNull: true,
|
|
145
|
+
comment: 'The ID of the new hotel that replaces the deleted one (null if hotel is completely deleted)',
|
|
146
|
+
}),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], DeletedHotel.prototype, "newHotelId", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, sequelize_typescript_1.Column)({
|
|
151
|
+
type: sequelize_typescript_1.DataType.TEXT,
|
|
152
|
+
allowNull: true,
|
|
153
|
+
comment: 'Optional reason for the hotel deletion/redirection',
|
|
154
|
+
}),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], DeletedHotel.prototype, "reason", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, sequelize_typescript_1.Column)({
|
|
159
|
+
type: sequelize_typescript_1.DataType.BOOLEAN,
|
|
160
|
+
allowNull: false,
|
|
161
|
+
defaultValue: true,
|
|
162
|
+
comment: 'Whether the redirection is still active',
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", Boolean)
|
|
165
|
+
], DeletedHotel.prototype, "isActive", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, sequelize_typescript_1.Column)({
|
|
168
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
169
|
+
allowNull: true,
|
|
170
|
+
comment: 'When the hotel was soft deleted (null if not deleted)',
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Date)
|
|
173
|
+
], DeletedHotel.prototype, "deletedAt", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
sequelize_typescript_1.CreatedAt,
|
|
176
|
+
(0, sequelize_typescript_1.Column)({
|
|
177
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
178
|
+
allowNull: false,
|
|
179
|
+
}),
|
|
180
|
+
__metadata("design:type", Date)
|
|
181
|
+
], DeletedHotel.prototype, "createdAt", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
sequelize_typescript_1.UpdatedAt,
|
|
184
|
+
(0, sequelize_typescript_1.Column)({
|
|
185
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
186
|
+
allowNull: false,
|
|
187
|
+
}),
|
|
188
|
+
__metadata("design:type", Date)
|
|
189
|
+
], DeletedHotel.prototype, "updatedAt", void 0);
|
|
190
|
+
exports.DeletedHotel = DeletedHotel = __decorate([
|
|
191
|
+
(0, sequelize_typescript_1.Table)({
|
|
192
|
+
tableName: 'deleted_hotels',
|
|
193
|
+
})
|
|
194
|
+
], DeletedHotel);
|
package/dist/models/Hotel.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export declare class Hotel extends Model<Partial<Hotel>> {
|
|
|
108
108
|
isAccessible: boolean;
|
|
109
109
|
parking?: string;
|
|
110
110
|
video?: string;
|
|
111
|
+
bookingsLast30Days: number;
|
|
111
112
|
accessibility: HotelAccessibility;
|
|
112
113
|
translations: HotelTranslation[];
|
|
113
114
|
hotelFacilityRelations: HotelFacility[];
|
package/dist/models/Hotel.js
CHANGED
|
@@ -444,6 +444,14 @@ __decorate([
|
|
|
444
444
|
}),
|
|
445
445
|
__metadata("design:type", String)
|
|
446
446
|
], Hotel.prototype, "video", void 0);
|
|
447
|
+
__decorate([
|
|
448
|
+
(0, sequelize_typescript_1.Column)({
|
|
449
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
|
450
|
+
allowNull: true,
|
|
451
|
+
defaultValue: 0,
|
|
452
|
+
}),
|
|
453
|
+
__metadata("design:type", Number)
|
|
454
|
+
], Hotel.prototype, "bookingsLast30Days", void 0);
|
|
447
455
|
__decorate([
|
|
448
456
|
(0, sequelize_typescript_1.HasOne)(() => HotelAccessibility_1.HotelAccessibility),
|
|
449
457
|
__metadata("design:type", HotelAccessibility_1.HotelAccessibility)
|