-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathgateway-jdl.jh
More file actions
74 lines (61 loc) · 1.5 KB
/
gateway-jdl.jh
File metadata and controls
74 lines (61 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// From https://github.com/PacktPublishing/Full-Stack-Development-with-JHipster
// License : https://github.com/PacktPublishing/Full-Stack-Development-with-JHipster/blob/master/LICENSE
/* Online fashion store */
entity Product {
name String required
description String
image ImageBlob
price BigDecimal required min(0)
size Size required
}
enum Size {
S, M, L, XL, XXL
}
entity ProductCategory {
name String required
description String
}
entity Customer {
firstName String required
lastName String required
gender Gender required
email String required
phone String required
addressLine1 String required
addressLine2 String
city String required
country String required
}
enum Gender {
MALE, FEMALE, OTHER
}
entity ProductOrder {
placedDate Instant required
status OrderStatus required
invoiceId Long
code String required
}
enum OrderStatus {
COMPLETED, PENDING, CANCELLED
}
entity OrderItem {
quantity Integer required min(0)
totalPrice BigDecimal required min(0)
status OrderItemStatus required
}
enum OrderItemStatus {
AVAILABLE, OUT_OF_STOCK, BACK_ORDER
}
relationship OneToOne {
Customer{user} to User
}
relationship ManyToOne {
OrderItem{product} to Product
}
relationship OneToMany {
Customer{order} to ProductOrder{customer},
ProductOrder{orderItem} to OrderItem{order},
ProductCategory{product} to Product{productCategory}
}
service * with serviceClass
paginate Product, Customer, ProductOrder, OrderItem with pagination