Files
raven/server/AyaNova/models/WorkOrderItemOutsideService.cs
2022-01-24 18:19:26 +00:00

93 lines
3.3 KiB
C#

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 WorkOrderItemOutsideService : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Notes { get; set; }
[Required]
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; }
[Required]
public decimal RepairCost { get; set; }
[Required]
public decimal RepairPrice { get; set; }
[Required]
public decimal ShippingCost { get; set; }
[Required]
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
//workaround for notification
[NotMapped, JsonIgnore]
public List<string> Tags { get; set; } = new List<string>();
[NotMapped, JsonIgnore]
public string Name { get; set; }
[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
*/