DeliveryPart: Add Unloading type instead of IsLesewagen
All checks were successful
Test / Run tests (push) Successful in 1m54s

This commit is contained in:
2025-12-12 12:34:57 +01:00
parent f228ba3019
commit bf6297f63b
9 changed files with 159 additions and 40 deletions

View File

@@ -9,6 +9,11 @@ using System.Text.Json.Nodes;
namespace Elwig.Models.Entities {
[Table("delivery_part"), PrimaryKey("Year", "DId", "DPNr")]
public class DeliveryPart : IDelivery {
public const string Dumper = "dumper";
public const string Pumped = "pumped";
public const string Box = "box";
[Column("year")]
public int Year { get; set; }
@@ -86,12 +91,27 @@ namespace Elwig.Models.Entities {
[Column("hand_picked")]
public bool? IsHandPicked { get; set; }
[Column("lesewagen")]
public bool? IsLesewagen { get; set; }
[Column("gebunden")]
public bool? IsGebunden { get; set; }
[Column("unloading")]
public string? Unloading { get; set; }
[NotMapped]
public bool IsDumper {
get => Unloading == Dumper;
set => Unloading = value ? Dumper : Unloading;
}
[NotMapped]
public bool IsPumped {
get => Unloading == Pumped;
set => Unloading = value ? Pumped : Unloading;
}
[NotMapped]
public bool IsBox {
get => Unloading == Box;
set => Unloading = value ? Box : Unloading;
}
[Column("temperature")]
public double? Temperature { get; set; }