Skip to content

Commit b5b6c02

Browse files
author
Mohaned Atef
committed
automatically generated puml
1 parent e926e60 commit b5b6c02

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
@startuml
2+
package com.iluwatar.monolithic.model {
3+
class Orders {
4+
- id : Long
5+
- product : Products
6+
- quantity : Integer
7+
- totalPrice : Double
8+
- user : User
9+
+ Orders()
10+
+ Orders(id : Long, user : User, product : Products, quantity : Integer, totalPrice : Double)
11+
# canEqual(other : Object) : boolean
12+
+ equals(o : Object) : boolean
13+
+ getId() : Long
14+
+ getProduct() : Products
15+
+ getQuantity() : Integer
16+
+ getTotalPrice() : Double
17+
+ getUser() : User
18+
+ hashCode() : int
19+
+ setId(id : Long)
20+
+ setProduct(product : Products)
21+
+ setQuantity(quantity : Integer)
22+
+ setTotalPrice(totalPrice : Double)
23+
+ setUser(user : User)
24+
+ toString() : String
25+
}
26+
class Products {
27+
- description : String
28+
- id : Long
29+
- name : String
30+
- price : Double
31+
- stock : Integer
32+
+ Products()
33+
+ Products(id : Long, name : String, description : String, price : Double, stock : Integer)
34+
# canEqual(other : Object) : boolean
35+
+ equals(o : Object) : boolean
36+
+ getDescription() : String
37+
+ getId() : Long
38+
+ getName() : String
39+
+ getPrice() : Double
40+
+ getStock() : Integer
41+
+ hashCode() : int
42+
+ setDescription(description : String)
43+
+ setId(id : Long)
44+
+ setName(name : String)
45+
+ setPrice(price : Double)
46+
+ setStock(stock : Integer)
47+
+ toString() : String
48+
}
49+
class User {
50+
- email : String
51+
- id : Long
52+
- name : String
53+
- password : String
54+
+ User()
55+
+ User(id : Long, name : String, email : String, password : String)
56+
# canEqual(other : Object) : boolean
57+
+ equals(o : Object) : boolean
58+
+ getEmail() : String
59+
+ getId() : Long
60+
+ getName() : String
61+
+ getPassword() : String
62+
+ hashCode() : int
63+
+ setEmail(email : String)
64+
+ setId(id : Long)
65+
+ setName(name : String)
66+
+ setPassword(password : String)
67+
+ toString() : String
68+
}
69+
}
70+
package com.iluwatar.monolithic.repository {
71+
interface OrderRepo {
72+
}
73+
interface ProductRepo {
74+
}
75+
interface UserRepo {
76+
+ findByEmail(String) : User {abstract}
77+
}
78+
}
79+
package com.iluwatar.monolithic.controller {
80+
class OrderCon {
81+
- orderRepository : OrderRepo
82+
- productRepository : ProductRepo
83+
- userRepository : UserRepo
84+
+ OrderCon(orderRepository : OrderRepo, userRepository : UserRepo, productRepository : ProductRepo)
85+
+ placeOrder(userId : Long, productId : Long, quantity : Integer) : Orders
86+
}
87+
class ProductCon {
88+
- productRepository : ProductRepo
89+
+ ProductCon(productRepository : ProductRepo)
90+
+ addProduct(product : Products) : Products
91+
+ getAllProducts() : List<Products>
92+
}
93+
class UserCon {
94+
- userRepository : UserRepo
95+
+ UserCon(userRepository : UserRepo)
96+
+ registerUser(user : User) : User
97+
}
98+
}
99+
package com.iluwatar.monolithic {
100+
class EcommerceApp {
101+
- log : Logger {static}
102+
- orderService : OrderCon
103+
- productService : ProductCon
104+
- userService : UserCon
105+
+ EcommerceApp(userService : UserCon, productService : ProductCon, orderService : OrderCon)
106+
# addProduct(scanner : Scanner)
107+
+ main(args : String[]) {static}
108+
# placeOrder(scanner : Scanner)
109+
# registerUser(scanner : Scanner)
110+
+ run(args : String[])
111+
}
112+
}
113+
UserCon --> "-userRepository" UserRepo
114+
Orders --> "-user" User
115+
OrderCon --> "-productRepository" ProductRepo
116+
OrderCon --> "-userRepository" UserRepo
117+
OrderCon --> "-orderRepository" OrderRepo
118+
EcommerceApp --> "-userService" UserCon
119+
EcommerceApp --> "-productService" ProductCon
120+
ProductCon --> "-productRepository" ProductRepo
121+
Orders --> "-product" Products
122+
EcommerceApp --> "-orderService" OrderCon
123+
@enduml

0 commit comments

Comments
 (0)