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 WorkOrderItemScheduledUser : ICoreBizObjectModel { public long Id { get; set; } public uint Concurrency { get; set; } public long? UserId { get; set; } [NotMapped] public string UserViz { get; set; } [Required] public decimal EstimatedQuantity { get; set; } public DateTime? StartDate { get; set; } public DateTime? StopDate { get; set; } public long? ServiceRateId { get; set; } [NotMapped] public string ServiceRateViz { get; set; } //workaround for notification [NotMapped, JsonIgnore] public List Tags { get; set; } = new List(); [NotMapped, JsonIgnore] public string Name { get; set; } [NotMapped, JsonIgnore] public bool IsPMGenerated { get; set; } = false;//INTERNAL, USED BY PM GENERATOR TO SIGNIFY IGNORE SCHEDULE CONFLICTS [Required] public long WorkOrderItemId { get; set; } [JsonIgnore] public WorkOrderItem WorkOrderItem { get; set; } [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.WorkOrderItemScheduledUser; } }//eoc }//eons /* CREATE TABLE [dbo].[AWORKORDERITEMSCHEDULEDUSER]( [AID] [uniqueidentifier] NOT NULL, [AWORKORDERITEMID] [uniqueidentifier] NOT NULL, [ACREATOR] [uniqueidentifier] NOT NULL, [AMODIFIER] [uniqueidentifier] NOT NULL, [ACREATED] [datetime] NOT NULL, [AMODIFIED] [datetime] NOT NULL, [AUSERID] [uniqueidentifier] NULL, [AESTIMATEDQUANTITY] [decimal](19, 5) NULL, [ASTARTDATE] [datetime] NULL, [ASTOPDATE] [datetime] NULL, [ASERVICERATEID] [uniqueidentifier] NULL */