-
-
Notifications
You must be signed in to change notification settings - Fork 212
/
simple-online-shop.jh
58 lines (48 loc) · 1.03 KB
/
simple-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
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)
}
relationship OneToMany {
Customer{address} to Address{customer}
}
relationship ManyToOne {
Category{parent} to Category
}
relationship ManyToMany {
Category{product(title)} to Product{category}
}
paginate Address, Customer, Product, Category with pagination
paginate Product with infinite-scroll
service Category with serviceClass