forked from jhipster/jdl-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
online-shop.jh
65 lines (53 loc) · 1.19 KB
/
online-shop.jh
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
//
// An entity model for an online shop
//
enum CategoryStatus {
AVAILABLE, RESTRICTED, DISABLED
}
entity Category {
description String required,
sortOrder Integer,
dateAdded LocalDate,
dateModified LocalDate,
status CategoryStatus
}
entity Product {
title String required,
keywords String,
description String,
rating Integer,
dateAdded LocalDate,
dateModified LocalDate
}
entity Customer {
firstName String,
lastName String,
email String,
telephone String
}
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
}
relationship OneToMany {
Customer{wishList(title)} to WishList{customer},
WishList{product(title)} to Product{wishList},
Customer{address} to Address{customer}
}
relationship ManyToOne {
Category{parent} to Category
}
relationship ManyToMany {
Category{product(title)} to Product{category}
}
paginate Customer, Product, Category with pagination
paginate Address with pager
paginate Product with infinite-scroll
service Category with serviceClass