-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.jdl
More file actions
100 lines (83 loc) · 2.02 KB
/
test.jdl
File metadata and controls
100 lines (83 loc) · 2.02 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
enum CategoryStatus {
AVAILABLE, RESTRICTED, DISABLED
}
enum Gender {
MALE, FEMALE, OTHER
}
enum Size {
S, M, L, XL, XXL
}
enum OrderStatus {
COMPLETED, PAID, PENDING, CANCELLED, REFUNDED
}
enum PaymentMethod {
CREDIT_CARD(card), IDEAL(ideal)
}
entity Category {
title String required
description String required,
sortOrder Integer,
dateAdded LocalDate,
dateModified LocalDate,
status CategoryStatus
}
entity Product {
title String required,
keywords String,
description String,
price BigDecimal required min(0)
productSize Size required
image ImageBlob
rating Integer,
dateAdded LocalDate,
dateModified LocalDate
}
entity ProductOrder {
quantity Integer required min(0)
totalPrice BigDecimal required min(0)
}
entity Customer {
firstName String,
lastName String,
email String,
telephone String,
gender Gender required
}
entity Address {
address1 String,
address2 String,
city String,
postcode String required maxlength(10),
country String required maxlength(2)
}
entity WishList {
title String required,
restricted Boolean
}
entity ShoppingCart {
placedDate Instant required
status OrderStatus required
totalPrice BigDecimal required min(0)
paymentMethod PaymentMethod required
paymentReference String
}
relationship OneToOne {
Customer{user(login) required} to User
}
relationship OneToMany {
Customer{cart} to ShoppingCart{customer required},
ShoppingCart{order} to ProductOrder{cart required},
Customer{wishList(title)} to WishList{customer required},
WishList{product(title)} to Product{wishList(title) required},
Customer{address} to Address{customer required}
}
relationship ManyToOne {
Category{parent} to Category,
ProductOrder{product(title) required} to Product
}
relationship ManyToMany {
Category{product(title)} to Product{category}
}
paginate Customer, Product, Category with pagination
paginate Address with pagination
paginate Product with infinite-scroll