using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; using AyaNova.Biz; namespace AyaNova.Models { //Data transfer no child collections public class dtWorkOrder : ICoreBizObjectModel { public dtWorkOrder() { Tags = new List(); } public long Id { get; set; } public uint Concurrency { get; set; } [Required] public long Serial { get; set; } public bool Active { get; set; } public string Notes { get; set; } public string Wiki { get; set; } public string CustomFields { get; set; } public List Tags { get; set; } [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.WorkOrder; } }//eoc public class WorkOrder : ICoreBizObjectModel { public WorkOrder() { Tags = new List(); //dependents Items = new List(); } public long Id { get; set; } public uint Concurrency { get; set; } [Required] public long Serial { get; set; } public bool Active { get; set; } public string Notes { get; set; } public string Wiki { get; set; } public string CustomFields { get; set; } public List Tags { get; set; } //dependents public List Items { get; set; } [NotMapped, JsonIgnore] public string Name { //Used by notification processor get { return this.Serial.ToString(); } } [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.WorkOrder; } }//eoc }//eons