[#34] First step of not using Bio as Attribute
This commit is contained in:
@ -17,7 +17,7 @@ namespace Elwig.Models.Entities {
|
||||
public string VtrgId { get; set; }
|
||||
|
||||
[Column("cultid")]
|
||||
public string CultId { get; set; }
|
||||
public string? CultId { get; set; }
|
||||
|
||||
[Column("area")]
|
||||
public int Area { get; set; }
|
||||
@ -47,7 +47,7 @@ namespace Elwig.Models.Entities {
|
||||
public virtual AreaComType AreaComType { get; private set; }
|
||||
|
||||
[ForeignKey("CultId")]
|
||||
public virtual WineCult WineCult { get; private set; }
|
||||
public virtual WineCult? WineCult { get; private set; }
|
||||
|
||||
[ForeignKey("KgNr")]
|
||||
public virtual WbKg Kg { get; private set; }
|
||||
@ -57,7 +57,7 @@ namespace Elwig.Models.Entities {
|
||||
|
||||
public int SearchScore(IEnumerable<string> keywords) {
|
||||
var list = new string?[] {
|
||||
WineCult.Name, Kg.AtKg.Name, Rd.Name, GstNr, Comment,
|
||||
WineCult?.Name, Kg.AtKg.Name, Rd.Name, GstNr, Comment,
|
||||
}.ToList();
|
||||
return Utils.GetSearchScore(list, keywords);
|
||||
}
|
||||
|
@ -31,6 +31,12 @@ namespace Elwig.Models.Entities {
|
||||
[ForeignKey("AttrId")]
|
||||
public virtual WineAttr? Attribute { get; private set; }
|
||||
|
||||
[Column("cultid")]
|
||||
public string? CultId { get; set; }
|
||||
|
||||
[ForeignKey("CultId")]
|
||||
public virtual WineCult? Cultivation { get; private set; }
|
||||
|
||||
[Column("weight")]
|
||||
public int Weight { get; set; }
|
||||
|
||||
@ -66,14 +72,14 @@ namespace Elwig.Models.Entities {
|
||||
[ForeignKey("KgNr, RdNr")]
|
||||
public virtual WbRd? Rd { get; private set; }
|
||||
|
||||
[Column("gerebelt")]
|
||||
public bool IsGerebelt { get; set; }
|
||||
[Column("net_weight")]
|
||||
public bool IsNetWeight { get; set; }
|
||||
|
||||
[Column("manual_weighing")]
|
||||
public bool ManualWeighing { get; set; }
|
||||
public bool IsManualWeighing { get; set; }
|
||||
|
||||
[Column("spl_check")]
|
||||
public bool SplCheck { get; set; }
|
||||
public bool IsSplCheck { get; set; }
|
||||
|
||||
[Column("hand_picked")]
|
||||
public bool? IsHandPicked { get; set; }
|
||||
|
Reference in New Issue
Block a user