@vibe-flats/booking-engine-common-server 1.0.94 → 1.0.96
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.
|
@@ -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,7 @@ export interface UnitDocument extends mongoose.Document {
|
|
|
78
80
|
createdAt: Date;
|
|
79
81
|
updatedAt: Date;
|
|
80
82
|
isTrue: boolean;
|
|
83
|
+
rating: number;
|
|
81
84
|
reviews: {
|
|
82
85
|
body: string;
|
|
83
86
|
isPublic: boolean;
|
|
@@ -85,9 +88,9 @@ export interface UnitDocument extends mongoose.Document {
|
|
|
85
88
|
createdAt: Date;
|
|
86
89
|
reservationId: string;
|
|
87
90
|
externalId: string;
|
|
88
|
-
platform:
|
|
91
|
+
platform: UnitReviewPlatform;
|
|
89
92
|
categories: {
|
|
90
|
-
name:
|
|
93
|
+
name: UnitReviewCategory;
|
|
91
94
|
rating: number;
|
|
92
95
|
}[];
|
|
93
96
|
}[];
|
|
@@ -118,6 +118,7 @@ const schema = new mongoose_1.default.Schema({
|
|
|
118
118
|
},
|
|
119
119
|
availableFrom: { type: Date, required: false },
|
|
120
120
|
isTrue: { type: Boolean, required: true, default: true },
|
|
121
|
+
rating: { type: Number, required: false },
|
|
121
122
|
reviews: {
|
|
122
123
|
type: [
|
|
123
124
|
{
|
|
@@ -135,11 +136,13 @@ const schema = new mongoose_1.default.Schema({
|
|
|
135
136
|
rating: { type: Number, required: true }
|
|
136
137
|
}
|
|
137
138
|
],
|
|
138
|
-
required: false
|
|
139
|
+
required: false,
|
|
140
|
+
_id: false
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
],
|
|
142
|
-
required: false
|
|
144
|
+
required: false,
|
|
145
|
+
_id: false
|
|
143
146
|
}
|
|
144
147
|
}, {
|
|
145
148
|
timestamps: true,
|