diff --git a/diagram.puml b/diagram.puml new file mode 100644 index 0000000..c2cac69 --- /dev/null +++ b/diagram.puml @@ -0,0 +1,77 @@ +@startuml +'https://plantuml.com/class-diagram + +skinparam linetype ortho + +entity "Movie" as movie { + * int : id <> + * createdAt : Date + * updatedAt : Date + * title : String + genre : String + year : int + runtime : int +} + +entity "Screen room" as screen { + * int : id <> + * createdAt : Date + * updatedAt : Date + * name : String + capacity : int +} + +entity "Screening" as screening { + * int : id <> + * createdAt : Date + * updatedAt : Date + * movie : Movie + * screen : Screen + * startTime : Date + price : decimal +} + +entity "Customer" as customer { + * int : id <> + * createdAt : Date + * updatedAt : Date + * name : String +} + +entity "Contact" as contact { + * int : id <> + * createdAt : Date + * updatedAt : Date + * customer : Customer + email : String + phone : String +} + +entity "Ticket" as ticket { + * int : id <> + * createdAt : Date + * updatedAt : Date + * screening : Screening + * customer : Customer + seat : String +} + +entity "Admin" as admin { + * int : id <> + * createdAt : Date + * updatedAt : Date + * name : String + * email : String + * password : String <> + -- + manages the movies and screenings,\nis not a customer +} + + +movie ||--o{ screening +screen ||--o{ screening +screening ||--o{ ticket +customer ||--o{ ticket +customer ||--|{ contact + +@enduml \ No newline at end of file diff --git a/er-diagram.png b/er-diagram.png new file mode 100644 index 0000000..83e4a4a Binary files /dev/null and b/er-diagram.png differ diff --git a/user-stories.md b/user-stories.md index b836475..d4e7f7e 100644 --- a/user-stories.md +++ b/user-stories.md @@ -1,3 +1,11 @@ - As a customer, so I can receive my tickets, I want to provide my contact information. - As a customer, so I can decide which movie I want to watch, I want to see a list of movies. -- As an admin, so I can manage the movies shown at the cinema, I want to update the list of movies. \ No newline at end of file +- As a customer, so I can pick the best seat, I want to reserve a seat of my choice. +- As a customer, so I can know the showtimes, I want to see the schedule of the movies. +- As a customer, so I can know the price, I want to see the price of the tickets. +- As an admin, so I can manage the movies shown at the cinema, I want to update the list of movies. +- As an admin, so I can manage the schedule of the movies, I want to update the schedule of the movies. +- As an admin, so I can manage the price of the tickets, I want to update the price of each screening. +- As an admin, so that my account is secure, I would like to sign in using an email address and password. + +![er-diagram.png](er-diagram.png) \ No newline at end of file