Elwig: Add ITime/XTime to entities and allow to export/import CTime/MTime
All checks were successful
Test / Run tests (push) Successful in 2m30s

This commit is contained in:
2025-06-17 17:42:52 +02:00
parent 3493ff6df1
commit 4234c7f994
17 changed files with 368 additions and 74 deletions

View File

@ -18,8 +18,8 @@ namespace Elwig.Models.Dtos {
("DefaultKg", "Ort", null, 40),
("SortId", "Sorte", null, 10),
("Weight", "Menge", "kg", 20),
("CreatedTimestamp", "Angemeldet", null, 35),
("ModifiedTimestamp", "Geändert", null, 35),
("CreatedAt", "Angemeldet", null, 35),
("ModifiedAt", "Geändert", null, 35),
("Status", "Status", null, 20),
];
@ -47,8 +47,8 @@ namespace Elwig.Models.Dtos {
public string? DefaultKg;
public string SortId;
public string Variety;
public DateTime CreatedTimestamp;
public DateTime? ModifiedTimestamp;
public DateTime CreatedAt;
public DateTime? ModifiedAt;
public int Weight;
public string? Status;
@ -65,10 +65,10 @@ namespace Elwig.Models.Dtos {
DefaultKg = m.DefaultKg?.Name;
SortId = a.SortId;
Variety = a.Variety.Name;
CreatedTimestamp = a.CreatedTimestamp;
ModifiedTimestamp = a.ModifiedTimestamp == a.CreatedTimestamp ? null : a.ModifiedTimestamp;
CreatedAt = a.CreatedAt;
ModifiedAt = a.ModifiedAt == a.CreatedAt ? null : a.ModifiedAt;
Weight = a.Weight;
Status = s.AncmtTo == null ? null : a.CreatedTimestamp >= s.AncmtTo ? "verspät." : "ok";
Status = s.AncmtTo == null ? null : a.CreatedAt >= s.AncmtTo ? "verspät." : "ok";
}
}
}