Architecture de base de donnée

Détails des entités
Chaque entité - sauf exception - possèdent les propriétés (createdAt / updatedAt) qui représentent les dates et heures de création et de modification via une class DateTrait
ORGANISATION
Stock les informations liées aux différentes organisations
Propriétés
- id * (uuid)
- name * (string)
- address * (text)
- zipcode * (string)
- town * (string)
- country * (string) enum
- officialIdentifier (string)
- officialIdentifierType (string) enum siren | other ...
- email (string)
- phone * (string)
Relations
- users (0..n OrganisationUser)
- sites (0..n OrganisationSite)
USER
Stock les informations liées aux différents utilisateurs
Propriétés
- id * (uuid)
- roles * (string array) default: ROLE_USER
- email * (string)
- password * (string)
- code (string)
- validated (boolean) default: false
- cguAt (datetime)
- firstName (string)
- lastName (string)
- phone (string)
- language (string) enum fr|en|de
- temperature (string) enum c|f
- theme (string) enum light|dark
- notificationEnabled (bool) false
- demoEnabled (bool) false
- appRating (float)
- needResetPassword (bool) default: false
- resetPasswordToken (string)
- resetPasswordAt (datetime)
- social_type (string)
- social_identifier (string)
Relations
- organisations (0..n OrganisationUser)
- devices (0..n Device)
ORGANISATION_USER
Stock les informations liées aux différentes relations entre users et organisations
Propriétés
- id * (uuid)
- rank * (string) enum default|admin
- status * (string) enum pending | validated | requested | rejected | expired
- invitationAt (DateTime)
- requestAccessAt (DateTime)
- code (string)
Relations
- organisation (1..1 Organisation)
- user (1..1 User)
MAIL
Stock les informations liées aux différents mails envoyés
Propriétés
- id * (uuid)
- receiver * (string)
- reference * (string)
- externalId (string)
- template * (string)
- context (json string)
- wasSentOn (DateTime)
- status (string array)
- internalErrors (string array)
SITE
Stock les informations liées aux différents sites d'installation
Propriétés
- id * (uuid)
- name * (string)
- address * (string)
- installationType * (string) enum à définir
- heatingType * (string) enum à définir
- constructionAt * (datetime)
- latitude (string)
- longitude (string)
- mode (string) enum summer | winter, default summer
Relations
- organisations (0..n OrganisationSite)
- products (0..n Products)
Virtual property
- owner (0..1 User)
PRODUCT
Stock les informations liées aux différents produits
Propriétés
- id * (uuid)
- name (string)
- modelIdentifier * (string)
- serialNumber * (string)
- firmwareVersion (int)
- installationAt (datetime)
- installationOrientation (string) enum à définir
- wallType (string) enum à définir
Relations
- site (0..1 Site)
- imgBoost (0..1 Media)
- imgBox (0..1 Media)
- parameters (0..2 ProductParameter)
PRODUCT_FIRMWARE
Stock les informations liées aux différentes versions des produits
Propriétés
- id * (uuid)
- modelIdentifier * (string)
- version * (int)
- manufacturer * (string)
- description (text)
- beta (bool) default : false
PRODUCT_DATA
Stock les informations liées aux différentes données crées par les produits
Propriétés
- id * (uuid)
- ... 🧠🧠🧠🧠🧠🧠 TODO liste de toutes les propriétés du produit
Relations
- product (1..1 Product)
- site (1..1 Site)
EVENT_DATA
Stock les informations liées aux différentes évenements générer
Propriétés
- id * (uuid)
- code * (int)
- functionality * (string)
- functionalityName * (string)
- type * (string) enum status|alert|advice
- arg1 (string)
- arg1Type (string) enum traductionkey|traduction|date|brut|temperature| •••
- arg2 (string)
- arg2Type (string) enum traductionkey|traduction|date|brut|temperature| •••
- isNotifiable (bool) default : false
- isSendByNotification (bool) default : false
- wasRead (bool) default : false
- wasShown (bool) default : false
Relations
- site (1..1 Site)
EVENT_DATA_PRODUCT
Stock les informations liées aux différentes évenements générer par les produits
Propriétés
- id * (uuid)
Relations
- product (1..1 Product)
MEDIA
Stock les informations liées aux différents médias
Propriétés
- id * (uuid)
- name * (string)
- ext * (string)
- type * (string)
PRODUCT_PARAMETER
Stock les informations liées aux différents réglages des modes été/hiver
Propriétés
- id * (uuid)
Relations
- product (0..1 Product)