Files
raven/server/AyaNova/models/WorkOrderItemPartRequest.cs
2021-04-01 23:39:50 +00:00

57 lines
1.6 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemPartRequest : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public long PartId { get; set; }
[Required]
public long PartWarehouseId { get; set; }
[Required]
public decimal Quantity { get; set; }
[Required]
public long PurchaseOrderItemId { get; set; }
[Required]
public decimal Received { 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.WorkOrderItemPartRequest; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[AWORKORDERITEMPARTREQUEST](
[AID] [uniqueidentifier] NOT NULL,
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[APARTID] [uniqueidentifier] NOT NULL,
[APARTWAREHOUSEID] [uniqueidentifier] NOT NULL,
[AQUANTITY] [decimal](19, 5) NOT NULL,
[APURCHASEORDERITEMID] [uniqueidentifier] NULL,
[ARECEIVED] [decimal](19, 5)
*/