using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; using AyaNova.Biz; namespace AyaNova.Models { public class WorkOrderItemOutsideService : ICoreBizObjectModel { public long Id { get; set; } public uint Concurrency { get; set; } public string Notes { get; set; } public long UnitId { get; set; } public long? VendorSentToId { get; set; } public long? VendorSentViaId { get; set; } public string RMANumber { get; set; } public string TrackingNumber { get; set; } public decimal RepairCost { get; set; } public decimal ShippingCost { get; set; } public decimal ShippingPrice { get; set; } public DateTime? SentDate { get; set; } public DateTime? ETADate { get; set; } public DateTime? ReturnDate { get; set; } //UTILITY FIELDS [NotMapped] public bool IsDirty { get; set; } = false;//never dirty coming from the server [Required] public long WorkOrderItemId { get; set; } [JsonIgnore] public WorkOrderItem WorkOrderItem { get; set; } [NotMapped, JsonIgnore] public AyaType AyaType { get => AyaType.WorkOrderItemOutsideService; } }//eoc }//eons /* CREATE TABLE [dbo].[AWORKORDERITEMOUTSIDESERVICE]( [AID] [uniqueidentifier] NOT NULL, [AWORKORDERITEMID] [uniqueidentifier] NOT NULL, [ACREATOR] [uniqueidentifier] NOT NULL, [AMODIFIER] [uniqueidentifier] NOT NULL, [ACREATED] [datetime] NOT NULL, [AMODIFIED] [datetime] NOT NULL, [ANOTES] [ntext] NULL, [AVENDORSENTTOID] [uniqueidentifier] NULL, [AVENDORSENTVIAID] [uniqueidentifier] NULL, [ARMANUMBER] [nvarchar](255) NULL, [ATRACKINGNUMBER] [nvarchar](255) NULL, [AREPAIRCOST] [decimal](19, 5) NULL, [AREPAIRPRICE] [decimal](19, 5) NULL, [ASHIPPINGCOST] [decimal](19, 5) NULL, [ASHIPPINGPRICE] [decimal](19, 5) NULL, [ADATESENT] [datetime] NULL, [ASENDERUSERID] [uniqueidentifier] NULL, [ADATEETA] [datetime] NULL, [ADATERETURNED] [datetime] NUL */