whitelabel-db 1.0.3 → 1.0.5
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/README.md +8 -0
- package/dist/libs/database.js +3 -1
- package/dist/models/Hotel.d.ts +10 -0
- package/dist/models/Hotel.js +21 -0
- package/package.json +1 -1
package/README.md
ADDED
package/dist/libs/database.js
CHANGED
|
@@ -15,6 +15,8 @@ const User_1 = require("../models/User");
|
|
|
15
15
|
const Agency_1 = require("../models/Agency");
|
|
16
16
|
const Project_1 = require("../models/Project");
|
|
17
17
|
const Hotel_1 = require("../models/Hotel");
|
|
18
|
+
const City_1 = require("../models/City");
|
|
19
|
+
const Country_1 = require("../models/Country");
|
|
18
20
|
const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
21
|
const connection = new sequelize_typescript_1.Sequelize({
|
|
20
22
|
dialect: 'postgres',
|
|
@@ -23,7 +25,7 @@ const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, functio
|
|
|
23
25
|
password: connectionDetails.password,
|
|
24
26
|
database: connectionDetails.dbname,
|
|
25
27
|
logging: false,
|
|
26
|
-
models: [User_1.User, Agency_1.Agency, Project_1.Project, Hotel_1.Hotel],
|
|
28
|
+
models: [User_1.User, Agency_1.Agency, Project_1.Project, Hotel_1.Hotel, City_1.City, Country_1.Country],
|
|
27
29
|
});
|
|
28
30
|
return connection
|
|
29
31
|
.authenticate()
|
package/dist/models/Hotel.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { AvailabilityResult } from '../libs/liteapi';
|
|
3
|
+
export type HotelImage = {
|
|
4
|
+
url: string;
|
|
5
|
+
thumbnailUrl: string;
|
|
6
|
+
caption: string;
|
|
7
|
+
order: number;
|
|
8
|
+
defaultImage: boolean;
|
|
9
|
+
};
|
|
3
10
|
export declare class Hotel extends Model<Partial<Hotel>> {
|
|
4
11
|
id: string;
|
|
5
12
|
name: string;
|
|
@@ -13,5 +20,8 @@ export declare class Hotel extends Model<Partial<Hotel>> {
|
|
|
13
20
|
zip: string;
|
|
14
21
|
main_photo: string;
|
|
15
22
|
stars: string;
|
|
23
|
+
checkinCheckoutTimes: string;
|
|
24
|
+
hotelImages: HotelImage[];
|
|
25
|
+
hotelFacilities: string[];
|
|
16
26
|
rate: AvailabilityResult;
|
|
17
27
|
}
|
package/dist/models/Hotel.js
CHANGED
|
@@ -104,6 +104,27 @@ __decorate([
|
|
|
104
104
|
}),
|
|
105
105
|
__metadata("design:type", String)
|
|
106
106
|
], Hotel.prototype, "stars", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, sequelize_typescript_1.Column)({
|
|
109
|
+
type: sequelize_typescript_1.DataType.JSONB,
|
|
110
|
+
allowNull: true,
|
|
111
|
+
}),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], Hotel.prototype, "checkinCheckoutTimes", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, sequelize_typescript_1.Column)({
|
|
116
|
+
type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
|
|
117
|
+
allowNull: true,
|
|
118
|
+
}),
|
|
119
|
+
__metadata("design:type", Array)
|
|
120
|
+
], Hotel.prototype, "hotelImages", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, sequelize_typescript_1.Column)({
|
|
123
|
+
type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.STRING),
|
|
124
|
+
allowNull: true,
|
|
125
|
+
}),
|
|
126
|
+
__metadata("design:type", Array)
|
|
127
|
+
], Hotel.prototype, "hotelFacilities", void 0);
|
|
107
128
|
exports.Hotel = Hotel = __decorate([
|
|
108
129
|
(0, sequelize_typescript_1.Table)({
|
|
109
130
|
tableName: 'static_hotels',
|