@likewatt/models 1.1.3 → 1.1.4

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.
@@ -1,6 +1,6 @@
1
1
  import { Document, Types } from 'mongoose';
2
- import { Tarif } from './internal/tarif';
3
2
  import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
3
+ import { Tarif } from './internal/tarif';
4
4
  /**
5
5
  * Représente un utilisateur dans le système.
6
6
  * - @Schema/timestamps : gère createdAt et updatedAt automatiques
@@ -9,18 +9,19 @@ import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
9
9
  * - class-validator rules : validation runtime
10
10
  */
11
11
  export declare class DefaultRate {
12
+ _id: Types.ObjectId;
12
13
  name?: string;
13
14
  rateId: Types.ObjectId;
14
15
  rates: Tarif[];
15
16
  restOfTheYear: RestOfTheYearTarifs;
16
17
  }
17
18
  export type DefaultRateDocument = DefaultRate & Document;
18
- export declare const DefaultRateSchema: import("mongoose").Schema<DefaultRate, import("mongoose").Model<DefaultRate, any, any, any, Document<unknown, any, DefaultRate, any, {}> & DefaultRate & {
19
+ export declare const DefaultRateSchema: import("mongoose").Schema<DefaultRate, import("mongoose").Model<DefaultRate, any, any, any, Document<unknown, any, DefaultRate, any, {}> & DefaultRate & Required<{
19
20
  _id: Types.ObjectId;
20
- } & {
21
+ }> & {
21
22
  __v: number;
22
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DefaultRate, Document<unknown, {}, import("mongoose").FlatRecord<DefaultRate>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<DefaultRate> & {
23
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DefaultRate, Document<unknown, {}, import("mongoose").FlatRecord<DefaultRate>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<DefaultRate> & Required<{
23
24
  _id: Types.ObjectId;
24
- } & {
25
+ }> & {
25
26
  __v: number;
26
27
  }>;
@@ -14,8 +14,8 @@ const mongoose_1 = require("mongoose");
14
14
  const swagger_1 = require("@nestjs/swagger");
15
15
  const mongoose_2 = require("@nestjs/mongoose");
16
16
  const class_validator_1 = require("class-validator");
17
- const tarif_1 = require("./internal/tarif");
18
17
  const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
18
+ const tarif_1 = require("./internal/tarif");
19
19
  /**
20
20
  * Représente un utilisateur dans le système.
21
21
  * - @Schema/timestamps : gère createdAt et updatedAt automatiques
@@ -26,6 +26,15 @@ const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
26
26
  let DefaultRate = class DefaultRate {
27
27
  };
28
28
  exports.DefaultRate = DefaultRate;
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({
31
+ description: 'Identifiant unique MongoDB',
32
+ example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
33
+ type: mongoose_1.Types.ObjectId,
34
+ readOnly: true,
35
+ }),
36
+ __metadata("design:type", mongoose_1.Types.ObjectId)
37
+ ], DefaultRate.prototype, "_id", void 0);
29
38
  __decorate([
30
39
  (0, swagger_1.ApiProperty)({
31
40
  description: 'Nom de l’invitation',
@@ -4,12 +4,12 @@ import { EnergyPrice } from './internal/energy-price.model';
4
4
  import { PeakHour } from './internal/peak-hour.model';
5
5
  import { OffPeakHour } from './internal/off-peak-hour.model';
6
6
  import { CustomerInfos } from './internal/customer-infos.model';
7
- import { Tarif } from './internal/tarif';
8
7
  import { BuildingData } from './internal/building-data';
9
8
  import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
10
9
  import { DataSourceHistory } from './internal/data-source-history';
11
10
  import { ConsumptionIndexes } from './internal/consumption-indexes';
12
11
  import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
12
+ import { Tarif } from './internal/tarif';
13
13
  export declare class Site {
14
14
  readonly _id: Types.ObjectId;
15
15
  id: string;
package/dist/core/Site.js CHANGED
@@ -19,12 +19,12 @@ const energy_price_model_1 = require("./internal/energy-price.model");
19
19
  const peak_hour_model_1 = require("./internal/peak-hour.model");
20
20
  const off_peak_hour_model_1 = require("./internal/off-peak-hour.model");
21
21
  const customer_infos_model_1 = require("./internal/customer-infos.model");
22
- const tarif_1 = require("./internal/tarif");
23
22
  const building_data_1 = require("./internal/building-data");
24
23
  const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
25
24
  const data_source_history_1 = require("./internal/data-source-history");
26
25
  const consumption_indexes_1 = require("./internal/consumption-indexes");
27
26
  const energy_price_tempo_model_1 = require("./internal/energy-price-tempo.model");
27
+ const tarif_1 = require("./internal/tarif");
28
28
  let Site = class Site {
29
29
  };
30
30
  exports.Site = Site;
@@ -1,7 +1,8 @@
1
- import { Types } from "mongoose";
2
- import { RestOfTheYearTarifs } from "../core/internal/rest-of-the-years-tarif";
3
- import { Tarif } from "../core/internal/tarif";
1
+ import { Types } from 'mongoose';
2
+ import { RestOfTheYearTarifs } from '../core/internal/rest-of-the-years-tarif';
3
+ import { Tarif } from './Tarif.types';
4
4
  export interface DefaultRate {
5
+ _id?: string;
5
6
  name?: string;
6
7
  rateId: Types.ObjectId;
7
8
  rates: Tarif[];
@@ -3,12 +3,12 @@ import { EnergyPrice } from './EnergyPrice.types';
3
3
  import { PeakHour } from './PeakHour.types';
4
4
  import { OffPeakHour } from './OffPeakHour.types';
5
5
  import { CustomerInfos } from './CustomerInfos.types';
6
- import { Tarif } from './Tarif.types';
7
6
  import { BuildingData } from './BuildingData.types';
8
7
  import { RestOfTheYearTarifs } from './RestOfTheYearTarifs.types';
9
8
  import { DataSourceHistory } from './DataSourceHistory.types';
10
9
  import { ConsumptionIndexes } from './ConsumptionIndexes.types';
11
10
  import { EnergyPriceTempo } from './EnergyPriceTempo.types';
11
+ import { Tarif } from './Tarif.types';
12
12
  export interface Site {
13
13
  _id?: string;
14
14
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {