63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Newtonsoft.Json;
|
|
using AyaNova.Biz;
|
|
|
|
namespace AyaNova.Models
|
|
{
|
|
public class WorkOrderItemLabor : ICoreBizObjectModel
|
|
{
|
|
|
|
public long Id { get; set; }
|
|
public uint Concurrency { get; set; }
|
|
|
|
public long? UserId { get; set; }
|
|
public DateTime? ServiceStartDate { get; set; }
|
|
public DateTime? ServiceStopDate { get; set; }
|
|
public long? ServiceRateId { get; set; }
|
|
public string ServiceDetails { get; set; }
|
|
public decimal ServiceRateQuantity { get; set; }
|
|
public decimal NoChargeQuantity { get; set; }
|
|
public long? ServiceBankId { get; set; }
|
|
public long? TaxCodeSaleId { get; set; }
|
|
public decimal BasePrice { get; set; }//Rate price per unit at time of entry
|
|
public decimal Price { get; set; }//contract adjusted price or a copy of BasePrice if no contract
|
|
public decimal ManualDiscountPct { get; set; }// (V7 "Discount") ad-hoc / % off of the contractprice (which is always set regardless if contract or not) entered manually
|
|
|
|
|
|
//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.WorkOrderItemLabor; }
|
|
|
|
}//eoc
|
|
}//eons
|
|
|
|
/*
|
|
CREATE TABLE [dbo].[AWORKORDERITEMLABOR](
|
|
[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,
|
|
[ASERVICESTARTDATE] [datetime] NULL,
|
|
[ASERVICESTOPDATE] [datetime] NULL,
|
|
[ASERVICERATEID] [uniqueidentifier] NULL,
|
|
[ASERVICEDETAILS] [ntext] NULL,
|
|
[ASERVICERATEQUANTITY] [decimal](19, 5) NULL,
|
|
[ANOCHARGEQUANTITY] [decimal](19, 5) NULL,
|
|
[ASERVICEBANKID] [uniqueidentifier] NULL,
|
|
[ATAXRATESALEID] [uniqueidentifier] NULL
|
|
*/ |