From 2feba43d19d408fd15dd72aadc115a618aa3b195 Mon Sep 17 00:00:00 2001
From: Bastien DUMONT <bdumont@grandlyon.com>
Date: Thu, 17 Oct 2024 11:03:32 +0200
Subject: [PATCH] chore: add jsdoc to models

---
 src/models/dataload.model.ts | 10 ++++++++--
 src/models/profile.model.ts  | 19 ++++++++++++++-----
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/models/dataload.model.ts b/src/models/dataload.model.ts
index e40d69dfe..35b1e72be 100644
--- a/src/models/dataload.model.ts
+++ b/src/models/dataload.model.ts
@@ -19,11 +19,17 @@ export interface DataloadEntity {
   _id?: string
   _type?: string
   _rev?: string
-  day: number
-  hour: number
+  /** load (in kWh or L) */
   load: number
+  /** minute of the date, set to 0 except for minute series */
   minute: number
+  /** hour of the date, set to 0 except for minute and hour series */
+  hour: number
+  /** day of the date, set to 1 for month and year series */
+  day: number
+  /** month of the date, set to 1 for year series */
   month: number
+  /** year of the date */
   year: number
   price?: number
 }
diff --git a/src/models/profile.model.ts b/src/models/profile.model.ts
index 0b0abd58b..a36f2cd44 100644
--- a/src/models/profile.model.ts
+++ b/src/models/profile.model.ts
@@ -1,27 +1,36 @@
 import { DateTime } from 'luxon'
 
-interface Onboarding {
-  isWelcomeSeen: boolean
-}
-
 export interface ProfileEntity {
   id: string
+  /** Hash used to verify the content of ecogestures */
   ecogestureHash: string
+  /** Hash used to verify the content of challenges */
   challengeHash: string
+  /** Hash used to verify the content of duels */
   duelHash: string
+  /** Hash used to verify the content of quiz */
   quizHash: string
+  /** Hash used to verify the content of exploration */
   explorationHash: string
+  /** Boolean used to inform if the user connects for the first time */
   isFirstConnection: boolean
+  /** Date of the last user connection */
   lastConnectionDate: string
+  /** Boolean used to inform if user has seen the last analysis */
   haveSeenLastAnalysis: boolean
+  /** Boolean used to inform if user has seen the analysis notification */
   sendAnalysisNotification: boolean
   isAnalysisReminderEnabled: boolean
+  /** Date of the last monthly analysis */
   monthlyAnalysisDate: string
   sendConsumptionAlert: boolean
   waterDailyConsumptionLimit: number
+  /** Check if a user has completed his consumption profile */
   isProfileTypeCompleted: boolean
   isProfileEcogestureCompleted: boolean
-  onboarding: Onboarding
+  onboarding: {
+    isWelcomeSeen: boolean
+  }
   mailToken: string
   partnersIssueSeenDate: {
     enedis?: string
-- 
GitLab