Elwig: Add ITime/XTime to entities and allow to export/import CTime/MTime
All checks were successful
Test / Run tests (push) Successful in 2m30s
All checks were successful
Test / Run tests (push) Successful in 2m30s
This commit is contained in:
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user