[#48] PaymentVariantsWindow: Add checkbox for custom member modifiers
All checks were successful
Test / Run tests (push) Successful in 2m22s

This commit is contained in:
2024-06-16 18:31:02 +02:00
parent 050e4f5b6f
commit 86e69e9ff8
8 changed files with 83 additions and 43 deletions

View File

@ -17,7 +17,6 @@ namespace Elwig.Models.Entities {
[Column("date")]
public required string DateString { get; set; }
[NotMapped]
public DateOnly Date {
get => DateOnly.ParseExact(DateString, "yyyy-MM-dd");
@ -26,7 +25,6 @@ namespace Elwig.Models.Entities {
[Column("transfer_date")]
public string? TransferDateString { get; set; }
[NotMapped]
public DateOnly? TransferDate {
get => TransferDateString != null ? DateOnly.ParseExact(TransferDateString, "yyyy-MM-dd") : null;
@ -37,7 +35,9 @@ namespace Elwig.Models.Entities {
public bool TestVariant { get; set; }
[Column("calc_time")]
public int? CalcTime { get; set; }
public int? CalcTimeUnix { get; set; }
[NotMapped]
public DateTime? CalcTime => CalcTimeUnix != null ? DateTimeOffset.FromUnixTimeSeconds((long)CalcTimeUnix).UtcDateTime.ToLocalTime() : null;
[Column("comment")]
public string? Comment { get; set; }