Files
raven/server/AyaNova/models/WorkOrderItemExpense.cs
2021-05-08 14:23:05 +00:00

64 lines
2.0 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemExpense : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Description { get; set; }
public string Name { get; set; }
[Required]
public decimal TotalCost { get; set; }
[Required]
public decimal ChargeAmount { get; set; }
[Required]
public decimal TaxPaid { get; set; }
public long? ChargeTaxCodeId { get; set; }
[NotMapped]
public string ChargeTaxCodeViz { get; set; }
public bool ReimburseUser { get; set; } = false;
public long? UserId { get; set; }
[NotMapped]
public string UserViz { get; set; }
public bool ChargeToCustomer { get; set; } = false;
//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.WorkOrderItemExpense; }
}//eoc
}//eons
/*
[dbo].[AWORKORDERITEMMISCEXPENSE](
[AID] [uniqueidentifier] NOT NULL,
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[ATOTALCOST] [decimal](19, 5) NULL,
[ACHARGEAMOUNT] [decimal](19, 5) NULL,
[ADESCRIPTION] [nvarchar](255) NULL,
[ATAXPAID] [decimal](19, 5) NULL,
[ACHARGETAXCODEID] [uniqueidentifier] NULL,
[ANAME] [nvarchar](255) NULL,
[AREIMBURSEUSER] [bit] NOT NULL,
[AUSERID] [uniqueidentifier] NULL,
[ACHARGETOCLIENT] [bit] NOT NULL,
*/