This commit is contained in:
femsci 2024-02-22 18:10:06 +01:00
parent ee97edfd39
commit 6fce808693
Signed by: femsci
GPG key ID: 21AC2CC03E5BBCD6
2 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,7 @@ public record OffenderPersona
public string LastName { get; set; } = string.Empty; public string LastName { get; set; } = string.Empty;
public string CityOfBirth { get; set; } = string.Empty; public string CityOfBirth { get; set; } = string.Empty;
public DateTime DateOfBirth { get; set; } public DateTime DateOfBirth { get; set; }
public char Sex { get; set; } public string Sex { get; set; } = string.Empty;
public string FamilyName { get; set; } = string.Empty; public string FamilyName { get; set; } = string.Empty;
public string? FathersName { get; set; } public string? FathersName { get; set; }
public string? MothersName { get; set; } public string? MothersName { get; set; }
@ -29,5 +29,5 @@ public record OffenderPersona
public string DwellingPlace { get; set; } = string.Empty; public string DwellingPlace { get; set; } = string.Empty;
[JsonIgnore] [JsonIgnore]
public Sex OffenderSex => (Sex)Sex; public Sex OffenderSex => string.IsNullOrWhiteSpace(Sex) ? Models.Sex.Unknown : (Sex)Sex[0];
} }

View file

@ -3,5 +3,6 @@ namespace Nyanbyte.PPCheck.Lib.Models;
public enum Sex : byte public enum Sex : byte
{ {
Male = (byte)'M', Male = (byte)'M',
Female = (byte)'F' Female = (byte)'F',
Unknown = 0,
} }