Add Deliveries
This commit is contained in:
96
Elwig/Models/DeliveryPart.cs
Normal file
96
Elwig/Models/DeliveryPart.cs
Normal file
@ -0,0 +1,96 @@
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Elwig.Models {
|
||||
[Table("delivery_part"), PrimaryKey("Year", "DId", "DPNr")]
|
||||
public class DeliveryPart {
|
||||
[Column("year")]
|
||||
public int Year { get; set; }
|
||||
|
||||
[Column("did")]
|
||||
public int DId { get; set; }
|
||||
|
||||
[ForeignKey("Year, DId")]
|
||||
public virtual Delivery Delivery { get; private set; }
|
||||
|
||||
[Column("dpnr")]
|
||||
public int DPNr { get; set; }
|
||||
|
||||
[Column("sortid")]
|
||||
public string SortId { get; set; }
|
||||
|
||||
[ForeignKey("SortId")]
|
||||
public virtual WineVar Variant { get; private set; }
|
||||
|
||||
[Column("weight")]
|
||||
public int Weight { get; set; }
|
||||
|
||||
[Column("kmw")]
|
||||
public double Kmw { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public double Oe {
|
||||
get {
|
||||
return Utils.KmwToOe(Kmw);
|
||||
}
|
||||
set {
|
||||
Kmw = Utils.OeToKmw(value);
|
||||
}
|
||||
}
|
||||
|
||||
[Column("qualid")]
|
||||
public string QualId { get; set; }
|
||||
|
||||
[ForeignKey("QualId")]
|
||||
public virtual WineQual Quality { get; private set; }
|
||||
|
||||
[Column("hkid")]
|
||||
public string HkId { get; set; }
|
||||
|
||||
[ForeignKey("HkId")]
|
||||
public virtual WineOrigin Origin { get; private set; }
|
||||
|
||||
[Column("kgnr")]
|
||||
public int KgNr { get; set; }
|
||||
|
||||
[ForeignKey("KgNr")]
|
||||
public virtual WbKg Kg { get; private set; }
|
||||
|
||||
[Column("rdnr")]
|
||||
public int? RdNr { get; set; }
|
||||
|
||||
[ForeignKey("KgNr, RdNr")]
|
||||
public virtual WbRd? Rd { get; private set; }
|
||||
|
||||
[Column("gerebelt")]
|
||||
public bool IsGerebelt { get; set; }
|
||||
|
||||
[Column("manual_weighing")]
|
||||
public bool ManualWeighing { get; set; }
|
||||
|
||||
[Column("spl_check")]
|
||||
public bool SplCheck { get; set; }
|
||||
|
||||
[Column("hand_picked")]
|
||||
public bool? IsHandPicked { get; set; }
|
||||
|
||||
[Column("lesewagen")]
|
||||
public bool? IsLesewagen { get; set; }
|
||||
|
||||
[Column("temperature")]
|
||||
public double? Temperature { get; set; }
|
||||
|
||||
[Column("acid")]
|
||||
public double? Acid { get; set; }
|
||||
|
||||
[Column("scale_id")]
|
||||
public string? ScaleId { get; set; }
|
||||
|
||||
[Column("weighing_id")]
|
||||
public string? WeighingId { get; set; }
|
||||
|
||||
[Column("comment")]
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user