finished implementing characters endpoints

This commit is contained in:
StevanFreeborn
2022-06-24 11:35:33 -05:00
parent 9bc24949b7
commit 15eea06073
7 changed files with 157 additions and 89 deletions
+12
View File
@@ -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>
+14 -1
View File
@@ -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;
}
}