-
-
Notifications
You must be signed in to change notification settings - Fork 215
/
online-shop.jh
71 lines (58 loc) · 1.26 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
66
67
68
69
70
71
//
// An entity model for an online shop
//
application {
config {
prodDatabaseType postgresql,
}
}
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 pagination
paginate Product with infinite-scroll
service Category with serviceClass