using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; using AyaNova.Biz; namespace AyaNova.Models { public class WorkOrderItem : ICoreBizObjectModel { [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.WorkOrderItem; } public long Id { get; set; } public uint Concurrency { get; set; } public string Notes { get; set; }//"Summary" field public string Wiki { get; set; } public string CustomFields { get; set; } public List Tags { get; set; } = new List(); [Required] public long WorkOrderId { get; set; } public string TechNotes { get; set; } public long? WorkOrderItemStatusId { get; set; } [NotMapped] public string WorkOrderItemStatusNameViz { get; set; } [NotMapped] public string WorkOrderItemStatusColorViz { get; set; } public long? WorkOrderItemPriorityId { get; set; } [NotMapped] public string WorkOrderItemPriorityNameViz { get; set; } [NotMapped] public string WorkOrderItemPriorityColorViz { get; set; } public DateTime? RequestDate { get; set; } public bool WarrantyService { get; set; } = false; public int Sequence { get; set; } public long? FromCSRId { get; set; } [NotMapped] public string FromCSRViz { get; set; } //workaround for notification [NotMapped, JsonIgnore] public string Name { get; set; } //Principle [JsonIgnore] public WorkOrder WorkOrder { get; set; } //dependents public List Expenses { get; set; } = new List(); public List Labors { get; set; } = new List(); public List Loans { get; set; } = new List(); public List Parts { get; set; } = new List(); public List PartRequests { get; set; } = new List(); public List ScheduledUsers { get; set; } = new List(); public List Tasks { get; set; } = new List(); public List Travels { get; set; } = new List(); public List Units { get; set; } = new List(); public List OutsideServices { get; set; } = new List(); }//eoc }//eons /* CREATE TABLE [dbo].[AWORKORDERITEM]( [AID] [uniqueidentifier] NOT NULL, [AWORKORDERID] [uniqueidentifier] NOT NULL, [ACREATOR] [uniqueidentifier] NOT NULL, [AMODIFIER] [uniqueidentifier] NOT NULL, [ACREATED] [datetime] NOT NULL, [AMODIFIED] [datetime] NOT NULL, [ATECHNOTES] [ntext] NULL, [AWORKORDERSTATUSID] [uniqueidentifier] NULL, [APRIORITYID] [uniqueidentifier] NULL, [AREQUESTDATE] [datetime] NULL, [ASUMMARY] [nvarchar](255) NULL,//Now Notes [ATYPEID] [uniqueidentifier] NULL,//Now a tag [AUNITID] [uniqueidentifier] NULL,//MOVED TO WOITEMUNITS COLLECTION [AWORKORDERITEMUNITSERVICETYPEID] [uniqueidentifier] NULL,//MOVE TO WOITEMUNITS COLLECTION? [AWARRANTYSERVICE] [bit] NOT NULL, [ACUSTOM1] [ntext] NULL, [ACUSTOM2] [ntext] NULL, [ACUSTOM3] [ntext] NULL, [ACUSTOM4] [ntext] NULL, [ACUSTOM5] [ntext] NULL, [ACUSTOM6] [ntext] NULL, [ACUSTOM7] [ntext] NULL, [ACUSTOM8] [ntext] NULL, [ACUSTOM9] [ntext] NULL, [ACUSTOM0] [ntext] NULL */