-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-shop.jdl
78 lines (68 loc) · 1.88 KB
/
simple-shop.jdl
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
application {
config {
baseName jHipster6Java11Test
applicationType monolith
packageName com.betterprojectsfaster.jhipster.test.jhipster6java11
authenticationType jwt
buildTool gradle
databaseType sql
devDatabaseType h2Disk
prodDatabaseType postgresql
cacheProvider ehcache
enableHibernateCache true
clientFramework angularX
useSass false
clientPackageManager npm
jhiPrefix bpf
enableTranslation true
nativeLanguage en
languages [en, de]
websocket spring-websocket
testFrameworks [protractor, cucumber]
}
entities *
}
entity Product {
name String required unique minlength(2) maxlength(90)
price Float required min(0)
description TextBlob required
picture ImageBlob required
specification Blob
category ProductCategory
inventory Integer required min(0)
}
enum ProductCategory {
Laptop, Desktop, Phone, Tablet, Accessory
}
entity Address {
addressLine1 String required minlength(2) maxlength(80)
addressLine2 String minlength(2) maxlength(80)
city String minlength(2) maxlength(80)
postalCode String minlength(5) maxlength(5)
}
entity ShoppingOrder {
name String required unique minlength(2) maxlength(90)
totalAmount Float min(0)
ordered ZonedDateTime
}
entity ProductOrder {
amount Integer required min(0) max(5)
}
entity Shipment {
shippedAt ZonedDateTime required
}
relationship OneToOne {
Shipment{order(name) required} to ShoppingOrder{shipment(shippedAt) required}
}
relationship OneToMany {
Product{order(name) required} to ProductOrder{product(name) required}
ShoppingOrder{orders required} to ProductOrder{overallOrder(name)}
}
relationship ManyToOne {
Address{user(login) required} to User
ProductOrder{buyer(login) required} to User
ShoppingOrder{buyer(login) required} to User
Shipment{shippedBy(login) required} to User
}
service * with serviceClass
dto * with mapstruct