-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoopcycle.jh
76 lines (63 loc) · 1.41 KB
/
coopcycle.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
72
73
74
75
76
entity Client {
adresse String
name String required pattern(/^[A-Z][a-z]+\d$/)
}
entity Coursier {
coordonne String required
noteCoursier Integer min(0) max(5)
}
entity Commercant {
adresse String required
}
entity Utilisateur {
id Integer required
name String required pattern(/^[A-Z][a-z]+\d$/)
firstname String required pattern(/^[A-Z][a-z]+\d$/)
mail String required
tel String required
}
entity Panier {
name String required pattern(/^[A-Z][a-z]+\d$/)
prix Integer required min(0)
}
entity Course {
prix Integer required min(0)
distance Float
date LocalDate required
}
entity Produit {
name String required pattern(/^[A-Z][a-z]+\d$/)
prix Integer required min(0)
description String required
}
entity Commerce {
adresse String required
name String required
noteCommerce Integer min(0) max(5)
}
entity Restaurant {
resto TypeRestaurant
}
enum TypeRestaurant {
TACOS, PIZZERIA, CREPERIE, BURGER, BOULANGERIE
}
entity AutreCommerce{
typeCommerce String required
}
relationship OneToMany {
Utilisateur to Panier
Panier to Commerce
Panier to Course
}
relationship OneToOne {
Utilisateur to Client
Utilisateur to Commercant
Utilisateur to Coursier
Commerce to Utilisateur
Commerce to Restaurant
Commerce to AutreCommerce
}
relationship ManyToMany {
Produit to Commerce
Panier to Produit
}