This commit is contained in:
@@ -5,14 +5,14 @@ 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
|
||||
|
||||
public class WorkOrderItem
|
||||
public class dtWorkOrderItem
|
||||
{
|
||||
public dtWorkOrderItem()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
public long Id { get; set; }
|
||||
public uint ConcurrencyToken { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
@@ -20,28 +20,34 @@ namespace AyaNova.Models
|
||||
|
||||
//Principle
|
||||
[Required]
|
||||
public long WorkorderId { get; set; }//fk
|
||||
public long WorkorderId { get; set; }
|
||||
}//eoc
|
||||
|
||||
[JsonIgnore]//Avoid circular reference when serializing
|
||||
public class WorkOrderItem
|
||||
{
|
||||
public WorkOrderItem()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
//dependents
|
||||
WorkorderItemLabors = new List<WorkOrderItemLabor>();
|
||||
WorkorderItemParts = new List<WorkOrderItemPart>();
|
||||
}
|
||||
public long Id { get; set; }
|
||||
public uint ConcurrencyToken { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
//Principle
|
||||
[Required]
|
||||
public long WorkorderId { get; set; }
|
||||
[JsonIgnore]
|
||||
public WorkOrder WorkOrder { get; set; }
|
||||
|
||||
//dependents
|
||||
public List<WorkOrderItemLabor> WorkorderItemLabors { get; set; }
|
||||
public List<WorkOrderItemPart> WorkorderItemParts { get; set; }
|
||||
|
||||
public WorkOrderItem()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
WorkorderItemLabors = new List<WorkOrderItemLabor>();
|
||||
WorkorderItemParts = new List<WorkOrderItemPart>();
|
||||
}
|
||||
|
||||
//Not persisted business properties
|
||||
//NOTE: this could be a common class applied to everything for common biz rule stuff
|
||||
// //i.e. specific rights in situations based on rules, like candelete, canedit etc
|
||||
// [NotMapped]
|
||||
// public bool OP { get; set; }//patch operation value
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
|
||||
Reference in New Issue
Block a user