Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
eadl:bloc3:dev_av:td2 [2025/10/08 00:12] – [4.4 Optimisation des identifiants avec Tsid] jcheron | eadl:bloc3:dev_av:td2 [2025/10/08 00:18] (Version actuelle) – [4.4 Optimisation des identifiants avec Tsid] jcheron | ||
---|---|---|---|
Ligne 266: | Ligne 266: | ||
< | < | ||
<uml> | <uml> | ||
- | @startuml | + | @startuml |
- | Review Entity | + | class Review { |
- | + | | |
- | !define ENTITY | + | - rating : Integer |
- | !define PK < | + | |
- | !define FK < | + | |
- | + | | |
- | ENTITY | + | |
- | | + | - createdAt : LocalDateTime |
- | FK productId : UUID | + | |
- | FK userId : UUID | + | |
- | -- | + | |
- | | + | |
- | title : String | + | |
- | comment : String | + | |
- | verified : Boolean | + | |
- | helpfulCount : Integer | + | |
- | -- | + | |
- | | + | |
- | updatedAt : LocalDateTime | + | |
} | } | ||
- | ENTITY | + | class Product { |
- | | + | |
- | name : String | + | |
- | | + | |
+ | - stock : Integer | ||
} | } | ||
- | ENTITY | + | class User { |
- | | + | |
- | username : String | + | |
- | | + | |
} | } | ||
- | Review | + | Product " |
- | Review | + | User " |
note right of Review | note right of Review | ||
- | | + | Contraintes métier : |
- | • rating | + | • rating |
+ | • 1 review max par (user, product) | ||
• verified = true si achat confirmé | • verified = true si achat confirmé | ||
- | • helpfulCount | + | • helpfulCount |
- | | + | |
+ | Tsid Generator pour l'id | ||
+ | (performance + tri chronologique) | ||
end note | end note | ||
- | note top of Review::id | + | @enduml |
- | | + | |
- | et tri chronologique | + | |
- | end note | + | |
- | @enduml | ||
</ | </ | ||
< | < |