Files
SomniaGuestLog/src/Somnia.GuestLog/Models/Entities/GuestDocument.cs
T
Daniel-Garmig 0abdfcd683 GuestDocument - Improvements to GuestDocument creation:
- IssueDate is now Nullable. Is not required for DNI and NIE document types.
- Improvements in SupportNumber for NIE documents.
- Address search can now be skipped.
2026-09-10 11:53:41 +02:00

37 lines
1.1 KiB
C#

namespace Somnia.GuestLog.Models.Entities;
public class GuestDocument : BaseEntity
{
public long Id { get; set; }
public int Version { get; set; }
public required string DocumentType { get; set; }
public required string DocumentNum { get; set; }
public required DateOnly? IssueDate { get; set; }
public string? SupportNum { get; set; }
public required string Nationality { get; set; }
public required string Name { get; set; }
public required string Surname { get; set; }
public string? Surname2 { get; set; }
public required DateOnly BirthDate { get; set; }
public string? Gender { get; set; }
public GuestAddress? AddressDetails { get; set; }
public string? PhoneNumber { get; set; }
public string? EmailAddress { get; set; }
//Generated Properties.
public required DateTime CreateTime { get; set; }
public required DateTime UpdateTime { get; set; }
public required bool IsLastVersion { get; set; }
public override string GetFullKey() => $"{Id}-{Version}";
public string FullDocument => $"{DocumentType}-{DocumentNum}";
}