Files
criminalmindsapi/server/Models/Character.cs
T

82 lines
2.3 KiB
C#
Raw Normal View History

2022-06-19 16:42:35 -05:00
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace server.Models
{
public class Character
{
/// <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}";
/// <summary>
/// The character's first name.
/// </summary>
2022-06-19 16:42:35 -05:00
[BsonElement("firstName")]
public string? FirstName { get; set; }
/// <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}";
/// <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; }
/// <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; }
/// <summary>
/// The seasons in which the character appeared.
/// </summary>
2022-06-19 16:42:35 -05:00
[BsonElement("seasons")]
public int[]? Seasons { get; set; }
/// <summary>
/// The first episode where the character appeared.
/// </summary>
2022-06-19 16:42:35 -05:00
[BsonElement("firstEpisode")]
public string? FirstEpisode { get; set; }
/// <summary>
/// The last episode where the character appeared.
/// </summary>
2022-06-19 16:42:35 -05:00
[BsonElement("lastEpisode")]
public string? LastEpisode { get; set; }
/// <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; }
/// <summary>
/// A brief bio of the character.
/// </summary>
[BsonElement("bio")]
public string? Bio { get; set; }
2022-06-19 16:42:35 -05:00
}
}