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