Models: Remove DeliveryPartAttr

This commit is contained in:
2023-10-31 22:21:24 +01:00
parent b1dad261d1
commit ad9f4d3a9a
12 changed files with 172 additions and 104 deletions

View File

@ -25,6 +25,12 @@ namespace Elwig.Models {
[ForeignKey("SortId")]
public virtual WineVar Variant { get; private set; }
[Column("attrid")]
public string? AttrId { get; set; }
[ForeignKey("AttrId")]
public virtual WineAttr? Attribute { get; private set; }
[Column("weight")]
public int Weight { get; set; }
@ -96,15 +102,6 @@ namespace Elwig.Models {
[Column("comment")]
public string? Comment { get; set; }
[InverseProperty("Part")]
public virtual ISet<DeliveryPartAttr> PartAttributes { get; private set; }
[NotMapped]
public IEnumerable<WineAttr> Attributes => PartAttributes.Select(a => a.Attr);
[NotMapped]
public string AttributesString => string.Join(" / ", Attributes);
[InverseProperty("Part")]
public virtual ISet<DeliveryPartModifier> PartModifiers { get; private set; }