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