Skip to content

Instantly share code, notes, and snippets.

@lSelectral
Created April 3, 2022 16:00
Show Gist options
  • Save lSelectral/f859346ad2dd171c445031376eb34066 to your computer and use it in GitHub Desktop.
Save lSelectral/f859346ad2dd171c445031376eb34066 to your computer and use it in GitHub Desktop.
UML Diagram for Movie Web API. Created by Mermaid.JS
classDiagram
Movie *-- Director
Actor <|-- Director
Movie : +string name
Movie : +int year
Movie : +enum genre
Movie : +string director
Movie : +List~string~ actors
Movie : +int price
class Actor{
+string name
+string lastName
+List~Movie~ playedMovies
}
class Director{
+string name
+string lastName
+List~Movie~ directedMovies
}
class Customer{
+string name
+string lastName
+List~string~ purchasedMovies
+List~enum~ favoriteGenres
+BuyMovie(Movie movie)
+Login(OAuth token)
}
class Order{
+Customer buyer
+Movie movie
+int price
+datetime
}
class MovieAdmin{
<<interface>>
+GetMovies()
+GetMovieById(int movieId)
+AddMovie(Movie movie)
+DeleteMovie(int movieId)
+UpdateMovie(Movie movie)
}
class CustomerAdmin{
<<interface>>
+GetMovies()
+GetMovieById(int movieId)
+AddMovie(Movie movie)
+DeleteMovie(int movieId)
+UpdateMovie(Movie movie)
}
class ActorAdmin{
<<interface>>
+GetMovies()
+GetMovieById(int movieId)
+AddMovie(Movie movie)
+DeleteMovie(int movieId)
+UpdateMovie(Movie movie)
}
class Genre{
<<enumeration>>
Action
Sci-Fi
Horror
Adventure
Animation
Romance
Western
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment