
/****** Object:  Table [dbo].[ApiDMSDocuments]    Script Date: 06.09.2021 20:45:10 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ApiDMSDocuments](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[DefId] [int] NOT NULL,
	[CustId] [int] NOT NULL,
	[CustLocationId] [int] NOT NULL,
	[CustName] [nvarchar](max) NULL,
	[CustLocationName] [nvarchar](max) NULL,
	[Name] [nvarchar](max) NULL,
	[Code] [nvarchar](max) NULL,
	[Number] [nvarchar](max) NULL,
	[StateId] [int] NOT NULL,
	[ProductId] [int] NOT NULL,
	[TypeId] [int] NOT NULL,
	[CategoryId] [int] NOT NULL,
	[DepartamentId] [int] NOT NULL,
	[Description] [nvarchar](max) NULL,
	[GroupId1] [int] NOT NULL,
	[GroupId2] [int] NOT NULL,
	[GroupId3] [int] NOT NULL,
	[ManufactureYear] [int] NOT NULL,
	[Adress] [nvarchar](max) NULL,
	[Value] [decimal](18, 2) NOT NULL,
	[ValidFrom] [datetime] NOT NULL,
	[ValidTo] [datetime] NOT NULL,
	[RemindDaysBefore] [int] NOT NULL,
	[VendorId] [int] NOT NULL,
	[TS] [datetime] NOT NULL,
	[CreatorId] [int] NOT NULL,
	[CreateTS] [datetime] NOT NULL,
 CONSTRAINT [PK_dbo.ApiDMSDocuments] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


