finished implementing characters endpoints
This commit is contained in:
@@ -12,6 +12,12 @@ namespace server.Models
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The character's full name.
|
||||
/// </summary>
|
||||
[BsonElement("fullName")]
|
||||
public string FullName => $"{FirstName} {LastName}";
|
||||
|
||||
/// <summary>
|
||||
/// The character's first name.
|
||||
/// </summary>
|
||||
@@ -24,6 +30,12 @@ namespace server.Models
|
||||
[BsonElement("lastName")]
|
||||
public string? LastName { get; set; }
|
||||
|
||||
/// <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>
|
||||
|
||||
@@ -8,6 +8,19 @@ namespace server.Models
|
||||
{
|
||||
public class CharacterFilter
|
||||
{
|
||||
// TODO: Build character filter model
|
||||
/// <summary>
|
||||
/// Used to filter characters by their name.
|
||||
/// </summary>
|
||||
public string? Name { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Used to filter characters by the actor's name.
|
||||
/// </summary>
|
||||
public string? ActorName { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Used to filter characters by a season.
|
||||
/// </summary>
|
||||
public int? Season { get; set; } = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user