This commit is contained in:
2021-02-15 17:45:21 +00:00
parent 075347e539
commit db4517d359
2 changed files with 108 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ namespace AyaNova.Models
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
[Required]
public long Serial { get; set; }
public bool Active { get; set; }
public string Notes { get; set; }
@@ -24,6 +24,10 @@ namespace AyaNova.Models
public List<string> Tags { get; set; }
public List<PurchaseOrderItem> Items { get; set; } = new List<PurchaseOrderItem>();
public PurchaseOrder()
{
Tags = new List<string>();
@@ -35,3 +39,46 @@ namespace AyaNova.Models
}//eoc
}//eons
/*
CREATE TABLE [dbo].[APURCHASEORDER](
[AID] [uniqueidentifier] NOT NULL,
[AVENDORMEMO] [nvarchar](255) NULL,
[ADROPSHIPTOCLIENTID] [uniqueidentifier] NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[APONUMBER] [int] IDENTITY(1,1) NOT NULL,
[AREFERENCENUMBER] [nvarchar](255) NULL,
[AVENDORID] [uniqueidentifier] NOT NULL,
[AORDEREDDATE] [datetime] NULL,
[AEXPECTEDRECEIVEDATE] [datetime] NULL,
[ANOTES] [ntext] NULL,
[ASTATUS] [smallint] NOT NULL,
[ACUSTOM1] [ntext] NULL,
[ACUSTOM2] [ntext] NULL,
[ACUSTOM3] [ntext] NULL,
[ACUSTOM4] [ntext] NULL,
[ACUSTOM5] [ntext] NULL,
[ACUSTOM6] [ntext] NULL,
[ACUSTOM7] [ntext] NULL,
[ACUSTOM8] [ntext] NULL,
[ACUSTOM9] [ntext] NULL,
[ACUSTOM0] [ntext] NULL,
[APROJECTID] [uniqueidentifier] NULL,
CREATE TABLE [dbo].[APURCHASEORDERRECEIPT](
[AID] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ARECEIVEDDATE] [datetime] NOT NULL,
[AVENDORID] [uniqueidentifier] NOT NULL,
[ATEXT1] [nvarchar](255) NULL,
[ATEXT2] [nvarchar](255) NULL,
*/

View File

@@ -0,0 +1,60 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace AyaNova.Models
{
public class PurchaseOrderItem
{
public long Id { get; set; }
public uint Concurrency { get; set; }
[Required]
public long PurchaseOrderId { get; set; }
[JsonIgnore]
public PurchaseOrder PurchaseOrder { get; set; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[APURCHASEORDERITEM](
[AID] [uniqueidentifier] NOT NULL,
[APURCHASEORDERID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[APARTID] [uniqueidentifier] NOT NULL,
[AQUANTITYORDERED] [decimal](19, 5) NULL,
[APURCHASEORDERCOST] [decimal](19, 5) NULL,
[AQUANTITYRECEIVED] [decimal](19, 5) NULL,
[ACLOSED] [bit] NOT NULL,
[AWORKORDERITEMPARTREQUESTID] [uniqueidentifier] NULL,
[APARTREQUESTEDBYID] [uniqueidentifier] NULL,
[APARTWAREHOUSEID] [uniqueidentifier] NULL,
[APURCHASETAXCODEID] [uniqueidentifier] NULL,
CREATE TABLE [dbo].[APURCHASEORDERRECEIPTITEM](
[AID] [uniqueidentifier] NOT NULL,
[APURCHASEORDERRECEIPTID] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[APARTID] [uniqueidentifier] NOT NULL,
[APARTWAREHOUSEID] [uniqueidentifier] NOT NULL,
[APURCHASEORDERID] [uniqueidentifier] NOT NULL,
[APURCHASEORDERITEMID] [uniqueidentifier] NOT NULL,
[ARECEIPTCOST] [decimal](19, 5) NOT NULL,
[AQUANTITYRECEIVED] [decimal](19, 5) NOT NULL,
PRIMARY KEY NONCLUSTERED
*/