-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataBase_Ebraire.jh
More file actions
76 lines (58 loc) · 1.24 KB
/
DataBase_Ebraire.jh
File metadata and controls
76 lines (58 loc) · 1.24 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
entity Customer {
id Long,
addressLine String required,
addressLine2 String,
postcode String required,
city String required
}
entity Ordered {
id Long,
commandStart LocalDate required,
delevryAddress String required,
billingAddress String required,
status Status required
}
entity OrderLine {
id Long,
quantity Integer required,
price Float required
}
entity Book {
id Long,
title String required,
authors String required,
description String required,
unitPrice Float required,
image Blob required //FILEPATH
}
entity Genre {
genre String required
}
entity Tag {
tag String required
}
entity Type {
type String required
}
enum Status{
ORDERED,
SHIPPED,
DELIVERED,
RETURNED,
CANCELED
}
relationship OneToOne {
Customer{user} to User
}
relationship OneToMany {
Customer{idOrder} to Ordered{idCustomer}, // chaque client a sa liste de commande
Ordered{orderLines} to OrderLine{order}
}
relationship ManyToMany {
Book{tags} to Tag{book}, // chaque livre a sa liste de categorie
Book{genres} to Genre{book} // chaque livre a sa liste de genre
}
relationship ManyToOne {
Book{type} to Type, // chaque livre a sa liste de type
OrderLine{book} to Book
}