@likewatt/models 1.10.3 → 1.10.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.
@@ -89,6 +89,22 @@ export declare const TechnologySchema: MSchema<Technology, import("mongoose").Mo
89
89
  } & {
90
90
  __v: number;
91
91
  }>;
92
+ export declare class Pv {
93
+ id: string;
94
+ name: string;
95
+ index?: number;
96
+ type?: number;
97
+ settings: Record<string, unknown>;
98
+ }
99
+ export declare const PvSchema: MSchema<Pv, import("mongoose").Model<Pv, any, any, any, Document<unknown, any, Pv, any, {}> & Pv & {
100
+ _id: import("mongoose").Types.ObjectId;
101
+ } & {
102
+ __v: number;
103
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Pv, Document<unknown, {}, import("mongoose").FlatRecord<Pv>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Pv> & {
104
+ _id: import("mongoose").Types.ObjectId;
105
+ } & {
106
+ __v: number;
107
+ }>;
92
108
  export declare class ConfigScenario {
93
109
  debtDuration?: number;
94
110
  debtRatio?: number;
@@ -148,6 +164,7 @@ export declare class Scenario {
148
164
  sellingPriceInflation?: number;
149
165
  siteId?: string;
150
166
  technologies?: Technology[];
167
+ pvs?: Pv[];
151
168
  version?: number;
152
169
  _createdAt: Date;
153
170
  }
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
12
+ exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  const uuid_1 = require("uuid");
@@ -212,6 +212,47 @@ exports.Technology = Technology = __decorate([
212
212
  (0, mongoose_1.Schema)({ _id: false })
213
213
  ], Technology);
214
214
  exports.TechnologySchema = mongoose_1.SchemaFactory.createForClass(Technology);
215
+ let Pv = class Pv {
216
+ };
217
+ exports.Pv = Pv;
218
+ __decorate([
219
+ (0, swagger_1.ApiProperty)({ example: 'pv1' }),
220
+ (0, mongoose_1.Prop)({ required: true }),
221
+ (0, class_validator_1.IsString)(),
222
+ __metadata("design:type", String)
223
+ ], Pv.prototype, "id", void 0);
224
+ __decorate([
225
+ (0, swagger_1.ApiProperty)({ example: 'pv 1' }),
226
+ (0, mongoose_1.Prop)({ required: true }),
227
+ (0, class_validator_1.IsString)(),
228
+ __metadata("design:type", String)
229
+ ], Pv.prototype, "name", void 0);
230
+ __decorate([
231
+ (0, swagger_1.ApiProperty)({ example: 0 }),
232
+ (0, mongoose_1.Prop)({ required: false }),
233
+ (0, class_validator_1.IsNumber)(),
234
+ __metadata("design:type", Number)
235
+ ], Pv.prototype, "index", void 0);
236
+ __decorate([
237
+ (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
238
+ (0, mongoose_1.Prop)({ type: Number }),
239
+ (0, class_validator_1.IsOptional)(),
240
+ (0, class_validator_1.IsNumber)(),
241
+ __metadata("design:type", Number)
242
+ ], Pv.prototype, "type", void 0);
243
+ __decorate([
244
+ (0, swagger_1.ApiProperty)({
245
+ example: { power: 100, orientation: 'south', tilt: 30 },
246
+ required: false,
247
+ }),
248
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
249
+ (0, class_validator_1.IsObject)(),
250
+ __metadata("design:type", Object)
251
+ ], Pv.prototype, "settings", void 0);
252
+ exports.Pv = Pv = __decorate([
253
+ (0, mongoose_1.Schema)({ _id: false })
254
+ ], Pv);
255
+ exports.PvSchema = mongoose_1.SchemaFactory.createForClass(Pv);
215
256
  let ConfigScenario = class ConfigScenario {
216
257
  };
217
258
  exports.ConfigScenario = ConfigScenario;
@@ -518,6 +559,12 @@ __decorate([
518
559
  (0, class_validator_1.IsArray)(),
519
560
  __metadata("design:type", Array)
520
561
  ], Scenario.prototype, "technologies", void 0);
562
+ __decorate([
563
+ (0, swagger_1.ApiProperty)({ type: [Pv] }),
564
+ (0, mongoose_1.Prop)({ type: [exports.PvSchema], required: true }),
565
+ (0, class_validator_1.IsArray)(),
566
+ __metadata("design:type", Array)
567
+ ], Scenario.prototype, "pvs", void 0);
521
568
  __decorate([
522
569
  (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
523
570
  (0, mongoose_1.Prop)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.10.3",
3
+ "version": "1.10.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {