This commit is contained in:
@@ -7,8 +7,7 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
|
||||
//otherwise the server will call it an invalid record if the field isn't sent from client
|
||||
//https://stackoverflow.com/questions/46517584/how-to-add-a-parent-record-with-its-children-records-in-ef-core#46615455
|
||||
|
||||
public class PartAssembly : ICoreBizObjectModel
|
||||
{
|
||||
@@ -21,12 +20,8 @@ namespace AyaNova.Models
|
||||
public string Notes { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public PartAssembly()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public List<PartAssemblyItem> Items { get; set; } = new List<PartAssemblyItem>();
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.PartAssembly; }
|
||||
|
||||
@@ -7,28 +7,16 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
|
||||
//otherwise the server will call it an invalid record if the field isn't sent from client
|
||||
|
||||
//https://stackoverflow.com/questions/46517584/how-to-add-a-parent-record-with-its-children-records-in-ef-core#46615455
|
||||
public class PartAssemblyItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
//Principle
|
||||
[Required]
|
||||
public long PartAssemblyId { get; set; }//fk
|
||||
// public PartAssembly PartAssembly { get; set; } //FOR NOW COMMENTINGH OUT THESE CONVENIENCE REFERENCES UNCOMMENT IF NEED LATER COULD BE YAGNI
|
||||
|
||||
public long PartId { get; set; }//fk
|
||||
//public Part Part { get; set; }
|
||||
|
||||
public PartAssemblyItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public long PartAssemblyId { get; set; }
|
||||
public PartAssembly PartAssembly { get; set; }
|
||||
public long PartId { get; set; }
|
||||
|
||||
}//eoc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user