2022-06-19 16:42:35 -05:00
|
|
|
using MongoDB.Bson;
|
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace server.Models
|
|
|
|
|
{
|
|
|
|
|
public class Character
|
|
|
|
|
{
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Identifier for the character.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonId]
|
|
|
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
|
|
|
public string? Id { get; set; }
|
|
|
|
|
|
2022-06-24 11:35:33 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The character's full name.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[BsonElement("fullName")]
|
|
|
|
|
public string FullName => $"{FirstName} {LastName}";
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The character's first name.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("firstName")]
|
|
|
|
|
public string? FirstName { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The character's last name.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("lastName")]
|
|
|
|
|
public string? LastName { get; set; }
|
|
|
|
|
|
2022-06-24 11:35:33 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The full name of the actor who potrayed the character.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[BsonElement("actorFullName")]
|
|
|
|
|
public string ActorFullName => $"{ActorFirstName} {ActorLastName}";
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The first name of the actor who potrayed the character.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("actorFirstName")]
|
|
|
|
|
public string? ActorFirstName { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The last name of the actor who potrayed the character.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("actorLastName")]
|
|
|
|
|
public string? ActorLastName { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The seasons in which the character appeared.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("seasons")]
|
|
|
|
|
public int[]? Seasons { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The first episode where the character appeared.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("firstEpisode")]
|
|
|
|
|
public string? FirstEpisode { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The last episode where the character appeared.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("lastEpisode")]
|
|
|
|
|
public string? LastEpisode { get; set; }
|
|
|
|
|
|
2022-06-21 17:17:32 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// A link to an image of the character.
|
|
|
|
|
/// </summary>
|
2022-06-19 16:42:35 -05:00
|
|
|
[BsonElement("image")]
|
|
|
|
|
public string? Image { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|