88 lines
3.1 KiB
C#
88 lines
3.1 KiB
C#
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; }
|
|
[NotMapped]
|
|
public string UnitViz { get; set; }
|
|
public long? VendorSentToId { get; set; }
|
|
[NotMapped]
|
|
public string VendorSentToViz { get; set; }
|
|
public long? VendorSentViaId { get; set; }
|
|
[NotMapped]
|
|
public string VendorSentViaViz { get; set; }
|
|
public string RMANumber { get; set; }
|
|
public string TrackingNumber { get; set; }
|
|
public decimal RepairCost { get; set; }
|
|
public decimal RepairPrice { 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; }
|
|
public long? TaxCodeId { get; set; }
|
|
[NotMapped]
|
|
public string TaxCodeViz { get; set; }
|
|
[NotMapped]
|
|
public decimal CostViz { get; set; }//Total cost shipping + repairs
|
|
[NotMapped]
|
|
public decimal PriceViz { get; set; }//Total price shipping + repairs
|
|
[NotMapped]
|
|
public decimal NetViz { get; set; }//=priceViz for standardization not because it's necessary (before taxes line total essentially)
|
|
[NotMapped]
|
|
public decimal TaxAViz { get; set; }//total amount of taxA
|
|
[NotMapped]
|
|
public decimal TaxBViz { get; set; }//total amount of taxB
|
|
[NotMapped]
|
|
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
|
|
|
|
|
|
|
//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
|
|
*/ |