@likewatt/models 1.2.4 → 1.2.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.
@@ -50,9 +50,9 @@ export declare class Site {
50
50
  customerInfos?: CustomerInfos;
51
51
  TCSPE?: number;
52
52
  TURPE_VERSION?: number;
53
- _createdAt: Date | string;
54
- _lastModified: Date | string;
55
- _lastUpdated: Date | string;
53
+ _createdAt?: Date | string;
54
+ _lastModified?: Date | string;
55
+ _lastUpdated?: Date | string;
56
56
  _step3?: boolean;
57
57
  _step3At?: Date | string;
58
58
  analysisYear?: number;
package/dist/core/Site.js CHANGED
@@ -237,7 +237,7 @@ __decorate([
237
237
  ], Site.prototype, "collectiveSiteId", void 0);
238
238
  __decorate([
239
239
  (0, swagger_1.ApiProperty)(),
240
- (0, mongoose_1.Prop)({ required: true }),
240
+ (0, mongoose_1.Prop)({ required: false }),
241
241
  (0, class_validator_1.IsString)(),
242
242
  __metadata("design:type", String)
243
243
  ], Site.prototype, "folder", void 0);
@@ -275,20 +275,23 @@ __decorate([
275
275
  __metadata("design:type", Number)
276
276
  ], Site.prototype, "TURPE_VERSION", void 0);
277
277
  __decorate([
278
- (0, swagger_1.ApiProperty)(),
278
+ (0, swagger_1.ApiPropertyOptional)(),
279
279
  (0, mongoose_1.Prop)({ type: Date, required: false }),
280
+ (0, class_validator_1.IsOptional)(),
280
281
  (0, class_validator_1.IsDate)(),
281
282
  __metadata("design:type", Object)
282
283
  ], Site.prototype, "_createdAt", void 0);
283
284
  __decorate([
284
- (0, swagger_1.ApiProperty)(),
285
+ (0, swagger_1.ApiPropertyOptional)(),
285
286
  (0, mongoose_1.Prop)({ type: Date, required: false }),
287
+ (0, class_validator_1.IsOptional)(),
286
288
  (0, class_validator_1.IsDate)(),
287
289
  __metadata("design:type", Object)
288
290
  ], Site.prototype, "_lastModified", void 0);
289
291
  __decorate([
290
- (0, swagger_1.ApiProperty)(),
292
+ (0, swagger_1.ApiPropertyOptional)(),
291
293
  (0, mongoose_1.Prop)({ type: String, required: false }),
294
+ (0, class_validator_1.IsOptional)(),
292
295
  (0, class_validator_1.IsString)(),
293
296
  __metadata("design:type", Object)
294
297
  ], Site.prototype, "_lastUpdated", void 0);
@@ -565,6 +568,7 @@ __decorate([
565
568
  exports.Site = Site = __decorate([
566
569
  (0, mongoose_1.Schema)({
567
570
  id: false,
571
+ timestamps: true,
568
572
  toJSON: { virtuals: true, versionKey: false },
569
573
  toObject: { virtuals: true, versionKey: false },
570
574
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {