Update models
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
namespace Elwig.Models {
|
||||
[Table("delivery_part"), PrimaryKey("Year", "DId", "DPNr")]
|
||||
@ -92,5 +94,17 @@ 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);
|
||||
|
||||
[InverseProperty("Part")]
|
||||
public virtual ISet<DeliveryPartModifier> PartModifiers { get; private set; }
|
||||
|
||||
[NotMapped]
|
||||
public IEnumerable<Modifier> Modifiiers => PartModifiers.Select(m => m.Modifier);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user