@vibe-flats/booking-engine-common-server 1.0.93 → 1.0.95
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/build/src/models/units.d.ts +15 -0
- package/build/src/models/units.js +24 -1
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ import { AreaDocument } from './areas';
|
|
|
3
3
|
import { BuildingDocument } from './building';
|
|
4
4
|
import { CityDocument } from './cities';
|
|
5
5
|
import { MarketDocument } from './markets';
|
|
6
|
+
export type UnitReviewCategory = 'cleanliness' | 'communication' | 'checkin' | 'accuracy' | 'location' | 'value' | 'service';
|
|
7
|
+
export type UnitReviewPlatform = 'direct' | 'airbnb' | 'vrbo' | 'booking';
|
|
6
8
|
export interface UnitDocument extends mongoose.Document {
|
|
7
9
|
name: string;
|
|
8
10
|
code: number;
|
|
@@ -78,6 +80,19 @@ export interface UnitDocument extends mongoose.Document {
|
|
|
78
80
|
createdAt: Date;
|
|
79
81
|
updatedAt: Date;
|
|
80
82
|
isTrue: boolean;
|
|
83
|
+
reviews: {
|
|
84
|
+
body: string;
|
|
85
|
+
isPublic: boolean;
|
|
86
|
+
rating: number;
|
|
87
|
+
createdAt: Date;
|
|
88
|
+
reservationId: string;
|
|
89
|
+
externalId: string;
|
|
90
|
+
platform: UnitReviewPlatform;
|
|
91
|
+
categories: {
|
|
92
|
+
name: UnitReviewCategory;
|
|
93
|
+
rating: number;
|
|
94
|
+
}[];
|
|
95
|
+
}[];
|
|
81
96
|
}
|
|
82
97
|
export declare const UnitModel: (connection: mongoose.Connection) => mongoose.Model<UnitDocument, {}, {}, {}, mongoose.Document<unknown, {}, UnitDocument> & UnitDocument & Required<{
|
|
83
98
|
_id: unknown;
|
|
@@ -117,7 +117,30 @@ const schema = new mongoose_1.default.Schema({
|
|
|
117
117
|
_id: false
|
|
118
118
|
},
|
|
119
119
|
availableFrom: { type: Date, required: false },
|
|
120
|
-
isTrue: { type: Boolean, required: true, default: true }
|
|
120
|
+
isTrue: { type: Boolean, required: true, default: true },
|
|
121
|
+
reviews: {
|
|
122
|
+
type: [
|
|
123
|
+
{
|
|
124
|
+
body: { type: String, required: true },
|
|
125
|
+
isPublic: { type: Boolean, required: true },
|
|
126
|
+
rating: { type: Number, required: true },
|
|
127
|
+
createdAt: { type: Date, required: true },
|
|
128
|
+
reservationId: { type: String, required: true },
|
|
129
|
+
externalId: { type: String, required: true },
|
|
130
|
+
platform: { type: String, required: true },
|
|
131
|
+
categories: {
|
|
132
|
+
type: [
|
|
133
|
+
{
|
|
134
|
+
name: { type: String, required: true },
|
|
135
|
+
rating: { type: Number, required: true }
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
required: false
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
required: false
|
|
143
|
+
}
|
|
121
144
|
}, {
|
|
122
145
|
timestamps: true,
|
|
123
146
|
versionKey: false,
|