using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; namespace server.Models { public class Episode { /// /// Identifier for the episode. /// [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string? Id { get; set; } /// /// Season number for the episode. /// [BsonElement("season")] public int? Season { get; set; } /// /// The episde number relative to the entire series. /// [BsonElement("numberInSeries")] public int? NumberInSeries { get; set; } /// /// The episode number relative to its season. /// [BsonElement("numberInSeason")] public int? NumberInSeason { get; set; } /// /// The title of the episode. /// [BsonElement("title")] public string? Title { get; set; } /// /// A brief summary of the episode. /// [BsonElement("summary")] public string? Summary { get; set; } /// /// The director of the episode. /// [BsonElement("directedBy")] public string? DirectedBy { get; set; } /// /// The writer of the episode. /// [BsonElement("writtenBy")] public string[]? WrittenBy { get; set; } /// /// Date the episode aired. /// [BsonElement("airDate")] [BsonDateTimeOptions(DateOnly = true)] public DateTime? AirDate { get; set; } /// /// Number of us viewers in millions for the episode. /// [BsonElement("usViewersInMillions")] public double? UsViewersInMillions { get; set; } } }