Skip to main content

Media Entities

Entities for media library organization, photos, videos, and articles.

MediaLibrary

Purpose: User media library organization.

Key Fields:

  • Id (int): Unique identifier
  • UserId: Library owner
  • Name: Library name
  • Description: Library description
  • Category: Fishing Trips, Tutorials, Catches, etc.
  • IsPublic: Public library flag
  • IsShared: Shared library flag
  • MediaCount: Number of media items

Relationships:

  • Many-to-one: User
  • One-to-many: PhotoAlbum, FishingVideo, FishingArticle

Usage Patterns:

// Create media library
var library = new MediaLibrary
{{
UserId = userId,
Name = "My Fishing Trips",
Category = "Fishing Trips",
IsPublic = false
}};

// Get user's libraries
var libraries = context.MediaLibraries
.Where(ml => ml.UserId == userId)
.ToList();

PhotoAlbum

Purpose: Photo albums for organizing fishing photos.

Key Fields:

  • Id (int): Unique identifier
  • MediaLibraryId: Associated library
  • Name: Album name
  • Description: Album description
  • CoverPhotoUrl: Cover photo URL
  • PhotoCount: Number of photos
  • CreatedAt: Creation date

Relationships:

  • Many-to-one: MediaLibrary

FishingVideo

Purpose: Fishing videos uploaded by users.

Key Fields:

  • Id (int): Unique identifier
  • MediaLibraryId: Associated library
  • Title: Video title
  • Description: Video description
  • VideoUrl: Video URL
  • ThumbnailUrl: Thumbnail URL
  • Duration: Video duration
  • ViewCount: View count
  • IsPublic: Public video flag

Relationships:

  • Many-to-one: MediaLibrary

FishingArticle

Purpose: Fishing articles and blog posts.

Key Fields:

  • Id (int): Unique identifier
  • MediaLibraryId: Associated library
  • Title: Article title
  • Content: Article content
  • Excerpt: Article excerpt
  • FeaturedImageUrl: Featured image
  • IsPublished: Published flag
  • PublishedAt: Publication date
  • ViewCount: View count

Relationships:

  • Many-to-one: MediaLibrary