@startuml
class CommandeFacade <<Facade>> {
  +passerCommande(idClient, params) : Boolean
}

class Client {
  -telephone : String
  -totalDepense : Float
  -nbAchat : Integer
  -DateDernierAcces : Date
}

class Panier {
  -idUtilisateur : Integer
  -montantTotal : Float
  +getLignes() : Array<LigneCommande>
  +resetPanier():Void
}

class LigneCommande {
  -idLigne : Integer
  -quantite : Integer
  -PrixUnitaire : Float
  -sousTotal : Float
}

class Produit {
  -idProduit : Integer
  -reference : String
  -nom : String
  -marque : String
  -description : String
  -prixAchat : Float
  -prixVente : Float
  -stock : Integer
  -dateAjout : Date
  -estDisponibleAlaVente : Boolean = false
}

class Commande {
  -idCommande : Integer
  -dateCommande : Date
  -montantTotal : Float
  -adresseLivraison : String
  -adresseFacturation : String
  -nomAcheteur : String
  -prenomAcheteur : String
  -nomDestinataire : String
  -prenomDestinataire : String
  +addLigne(LigneCommande):Boolean

}

enum EtatCommande {
  EN_PREPARATION
  EXPEDIEE
  LIVREE
  ANNULÉE
  REMBOURSEE
}

Client "1" -- "1" Panier : possède
Panier "1" *-- "0..*" LigneCommande : contient
Commande "1" *-- "0..*" LigneCommande : contient
LigneCommande "0..*" -- "1" Produit : concerne
Client "1" -- "0..*" Commande : passe
Commande "0..*" -- "1" EtatCommande : etat

CommandeFacade --> Panier
CommandeFacade --> Commande
@enduml