Continues core Domain structure modeling

This commit is contained in:
BinaryAlley committed 2024-08-23 10:07:04 +03:00
1 parent c39652066e
commit 50c15cf889
54 files changed
+2318 -159

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
- [Lumina Domain](#lumina-domain)
- [Video Library Aggregate](#video-library-aggregate)
- [Movie](#movie)
# [Lumina Domain](#lumina-domain)
## [Video Library Aggregate](#video-library-aggregate)
### [Movie](#movie)
```csharp
class Movie
{
ErrorOr<Movie> Create(MovieId id, VideoMetadata metadata, List<MediaContributorId> contributors);
}
```
```json
{
"id": { "value": "00000000-0000-0000-0000-000000000000" },
"metadata": {
"title": "The Lord of the Rings - The Fellowship of the Ring",
"originalTitle": "The Lord of the Rings - The Fellowship of the Ring",
"description": "The greatest fantasy movie ever made",
"releaseInfo": {
"originalReleaseDate": "2001-12-19",
"originalReleaseYear": 2001,
"reReleaseDate": "2024-06-08",
"reReleaseYear": 2024,
"releaseCountry": "us",
"releaseVersion": "Director's Cut"
},
"language": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"originalLanguage": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"tags": [
{ "name": "epic quest" },
{ "name": "friendship" },
{ "name": "middle-earth" }
],
"genres": [
{ "name": "fantasy" },
{ "name": "adventure" },
{ "name": "action" }
],
"durationInSeconds": 10680,
"resolution": "3840x2160",
"frameRate": 29.97,
"videoCodec": "h.265/hevc",
"audioCodec": "FLAC"
},
"contributors": [
{ "value": "00000000-0000-0000-0000-000000000000" }
],
"ratings": [
{
"value": 9.8,
"maxValue": 10.0,
"source": "TheMovieDb",
"voteCount": 1547036
}
]
}
```
@@ -0,0 +1,196 @@
- [Lumina Domain](#lumina-domain)
- [Written Content Library Aggregate](#written-content-library-aggregate)
- [Book](#book)
# [Lumina Domain](#lumina-domain)
## [Written Content Library Aggregate](#written-content-library-aggregate)
### [Book](#book)
```csharp
class Book
{
ErrorOr<Book> Create(
WrittenContentMetadata metadata,
BookFormat format,
Optional<string> edition,
Optional<int> volumeNumber,
Optional<string> series,
Optional<string> asin,
Optional<string> goodreadsId,
Optional<string> lccn,
Optional<string> oclcNumber,
Optional<string> openLibraryId,
Optional<string> libraryThingId,
Optional<string> googleBooksId,
Optional<string> barnesAndNobleId,
Optional<string> koboId,
Optional<string> appleBooksId,
List<Isbn> isbns,
List<MediaContributorId> contributors,
List<Rating> ratings);
}
```
```json
{
"id": {
"value": "00000000-0000-0000-0000-000000000000"
},
"metadata": {
"title": "The Lord of the Rings: The Fellowship of the Ring",
"originalTitle": "The Fellowship of the Ring",
"description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
"releaseInfo": {
"originalReleaseDate": "1954-07-29",
"originalReleaseYear": 1954,
"reReleaseDate": "2001-09-06",
"reReleaseYear": 2001,
"releaseCountry": "uk",
"releaseVersion": "50th Anniversary Edition"
},
"language": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"originalLanguage": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"tags": [
{ "name": "epic fantasy" },
{ "name": "quest" },
{ "name": "middle-earth" }
],
"genres": [
{ "name": "fantasy" },
{ "name": "adventure" },
{ "name": "classic" }
],
"publisher": "Houghton Mifflin",
"pageCount": 398
},
"format": "Paperback",
"edition": "50th Anniversary Edition",
"volumeNumber": 1,
"series": "The Lord of the Rings",
"asin": "B007978NPG",
"goodreadsId": "3",
"lccn": "2001025199",
"oclcNumber": "48494995",
"openLibraryId": "OL7603910M",
"libraryThingId": "3203347",
"googleBooksId": "aWZzLPhY4o0C",
"barnesAndNobleId": "1100307790",
"koboId": "the-fellowship-of-the-ring",
"appleBooksId": "id395211",
"isbns": [
{
{
"value": "0395272238",
"format": "Isbn10"
},
{
"value": "9780395272237",
"format": "Isbn13"
}
}
],
"contributors": [
{
"value": "00000000-0000-0000-0000-000000000000",
}
],
"ratings": [
{
"source": "Goodreads",
"value": 4.36,
"maxValue": 5,
"voteCount": 2345678
},
{
"source": "Amazon",
"value": 4.7,
"maxValue": 5,
"voteCount": 87654
}
]
}
{
"id": {
"value": "00000000-0000-0000-0000-000000000000"
},
"metadata": {
"title": "The Lord of the Rings - The Fellowship of the Ring",
"originalTitle": "The Lord of the Rings - The Fellowship of the Ring",
"description": "The greatest fantasy movie ever made",
"releaseInfo": {
"originalReleaseDate": "2001-12-19",
"originalReleaseYear": 2001,
"reReleaseDate": "2024-06-08",
"reReleaseYear": 2024,
"releaseCountry": "us",
"releaseVersion": "Director's Cut"
},
"language": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"originalLanguage": {
"languageCode": "en",
"languageName": "English",
"nativeName": "English"
},
"tags": [
{ "name": "epic quest" },
{ "name": "friendship" },
{ "name": "middle-earth" }
],
"genres": [
{ "name": "fantasy" },
{ "name": "adventure" },
{ "name": "action" }
],
"publisher": "Allen & Unwin",
"pageCount": 432
},
"format": "Hardcover",
"edition": "First Edition",
"volumeNumber": 1,
"series": "The Lord of the Rings",
"isbn": "978-0261103573",
"asin": "B00GO9BZLU",
"goodreadsId": "3",
"lccn": "2001271784",
"oclcNumber": "46516480",
"openLibraryId": "OL7603610M",
"libraryThingId": "3203347",
"googleBooksId": "aWZzLPhY4o0C",
"barnesAndNobleId": "1100307790",
"koboId": "lord-of-the-rings-fellowship-of-the-ring",
"appleBooksId": "id395211",
"contributors": [
{
"value": "00000000-0000-0000-0000-000000000000",
}
],
"ratings": [
{
"source": "Goodreads",
"value": 4.36,
"maxValue": 5,
"voteCount": 2345678
},
{
"source": "Amazon",
"value": 4.7,
"maxValue": 5,
"voteCount": 87654
}
]
}
```
+51
View File
@@ -121,6 +121,27 @@
- SupplementaryContentLibrary (root: SupplementaryContentLibrary, entities: SubtitleFile, Lyrics, LanguageTrack)
- FileManagement (root: File, entities: Stream)
- WrittenContentLibrary
- BookLibrary (root: BookLibrary)
- Entities: Book, BookSeries
- Value Objects: BookMetadata, SeriesInfo
- ComicLibrary (root: ComicLibrary)
- Entities: ComicBook, ComicSeries, Manga, GraphicNovel
- Value Objects: ComicMetadata, SeriesInfo
- PeriodicalLibrary (root: PeriodicalLibrary)
- Entities: Magazine, MagazineIssue
- Value Objects: PeriodicalMetadata, IssueInfo
- AcademicLibrary (root: AcademicLibrary)
- Entities: AcademicPaper
- Value Objects: AcademicMetadata, CitationInfo
- MiscWrittenContentLibrary (root: MiscWrittenContentLibrary)
- Entities: SheetMusic, Screenplay
- Value Objects: SheetMusicMetadata, ScreenplayMetadata
## Value Objects
- BaseMetadata
- VideoMetadata
@@ -171,6 +192,36 @@
- FileManagementService
- LanguageTrackManager
- CrossMediaRelationshipManager
- ContentCurationService
- UserActivityTrackingService
- ContentSynchronizationService
## Domain Events
- MediaItemAdded
- MediaItemRemoved
- PlaylistCreated
- PlaylistUpdated
- UserPreferencesChanged
- MetadataUpdated
- FileTranscoded
- StreamStarted
- StreamEnded
## Bounded Contexts
- MediaManagement
- Aggregates: VideoLibrary, AudioLibrary, PodcastLibrary, WrittenContentLibrary, PhotoLibrary
- Services: MediaScanner, MetadataFetcher, TranscodingService
- UserExperience
- Aggregates: UserProfile
- Services: RecommendationEngine, ContentCurationService, UserActivityTrackingService
- ContentDelivery
- Aggregates: FileManagement
- Services: StreamingService, ContentSynchronizationService
- MetadataManagement
- Aggregates: SupplementaryContentLibrary
- Services: LyricsMatchingService, ArtworkManagementService
## Repositories
- VideoRepository