53 lines
767 B
Plaintext
53 lines
767 B
Plaintext
|
@startuml
|
||
|
'https://plantuml.com/class-diagram
|
||
|
|
||
|
class Product {
|
||
|
int id
|
||
|
String name
|
||
|
String category
|
||
|
}
|
||
|
|
||
|
class ProductVariant {
|
||
|
int id
|
||
|
int product_id
|
||
|
String name
|
||
|
String short_description
|
||
|
String long_description
|
||
|
int price
|
||
|
}
|
||
|
|
||
|
class Stock {
|
||
|
int id
|
||
|
int product_variant_id
|
||
|
int quantity
|
||
|
QuantityUnit quantity_unit
|
||
|
}
|
||
|
|
||
|
class Photo {
|
||
|
int id
|
||
|
String local_path
|
||
|
String file_name
|
||
|
String unique_name
|
||
|
}
|
||
|
|
||
|
class ProductPhoto {
|
||
|
int id
|
||
|
int product_variant_id
|
||
|
int photo_id
|
||
|
}
|
||
|
|
||
|
Product -- ProductVariant : owns >
|
||
|
ProductVariant -- Stock : owns >
|
||
|
Photo -- ProductPhoto : < owns
|
||
|
ProductVariant -- ProductPhoto : < owns
|
||
|
Stock -- QuantityUnit : contains
|
||
|
|
||
|
enum QuantityUnit {
|
||
|
g
|
||
|
dkg
|
||
|
kg
|
||
|
piece
|
||
|
}
|
||
|
|
||
|
@enduml
|