From db4517d3595217f8813a85d41456e5aa19760a18 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 15 Feb 2021 17:45:21 +0000 Subject: [PATCH] --- server/AyaNova/models/PurchaseOrder.cs | 49 +++++++++++++++++- server/AyaNova/models/PurchaseOrderItem.cs | 60 ++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 server/AyaNova/models/PurchaseOrderItem.cs diff --git a/server/AyaNova/models/PurchaseOrder.cs b/server/AyaNova/models/PurchaseOrder.cs index f6dbff24..f05bc563 100644 --- a/server/AyaNova/models/PurchaseOrder.cs +++ b/server/AyaNova/models/PurchaseOrder.cs @@ -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 Tags { get; set; } + public List Items { get; set; } = new List(); + + + public PurchaseOrder() { Tags = new List(); @@ -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, +*/ \ No newline at end of file diff --git a/server/AyaNova/models/PurchaseOrderItem.cs b/server/AyaNova/models/PurchaseOrderItem.cs new file mode 100644 index 00000000..0653dc19 --- /dev/null +++ b/server/AyaNova/models/PurchaseOrderItem.cs @@ -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 + + +*/ \ No newline at end of file