
/****** Object:  Table [dbo].[ApiProdActions]    Script Date: 06.09.2021 20:29:46 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ApiProdActions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[CustId] [int] NOT NULL,
	[Number] [int] NOT NULL,
	[Year] [int] NOT NULL,
	[Month] [int] NOT NULL,
	[Series] [nvarchar](max) NULL,
	[NumberString] [nvarchar](max) NULL,
	[ReferenceOpeId] [int] NOT NULL,
	[StateId] [int] NOT NULL,
	[Time] [datetime] NOT NULL,
	[CreateTS] [datetime] NOT NULL,
	[Description] [nvarchar](max) NULL,
	[Modified] [int] NOT NULL,
	[OperatorId] [int] NOT NULL,
	[CustInfo] [nvarchar](max) NULL,
	[ErpId] [int] NOT NULL,
	[Size] [decimal](16, 4) NULL,
	[ParentActionId] [int] NULL,
	[Material] [nvarchar](20) NULL,
 CONSTRAINT [PK_dbo.ApiProdActions] 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

ALTER TABLE [dbo].[ApiProdActions] ADD  DEFAULT ((0)) FOR [OperatorId]
GO

ALTER TABLE [dbo].[ApiProdActions] ADD  DEFAULT ((0)) FOR [ErpId]
GO


