
/****** Object:  Table [dbo].[ApiDefinitions]    Script Date: 06.09.2021 19:55:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ApiDefinitions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ErpId] [int] NOT NULL,
	[ConfigId] [int] NOT NULL,
	[Name] [nvarchar](max) NULL,
	[Type] [int] NOT NULL,
	[Symbol] [nvarchar](max) NULL,
	[Pattern] [nvarchar](max) NULL,
	[Template] [int] NOT NULL,
	[Behaviour] [int] NOT NULL,
	[DefaultCust] [int] NOT NULL,
	[AutoSave] [int] NOT NULL,
	[Default] [bit] NOT NULL,
	[FiltrItems] [nvarchar](max) NULL,
	[FiltrCustomers] [nvarchar](max) NULL,
	[ChangeItemState] [bit] NOT NULL,
	[ChooseBach] [int] NOT NULL,
	[NettoBrutto] [int] NOT NULL,
	[HasPayment] [int] NOT NULL,
	[AllowNewItem] [bit] NOT NULL,
	[OnlyQuantity] [bit] NOT NULL,
	[PrintDoc] [int] NOT NULL,
	[SecoundDateName] [nvarchar](max) NULL,
	[UseLocalization] [int] NOT NULL,
	[FlowDirection] [int] NOT NULL,
	[Parms] [nvarchar](max) NULL,
	[HasDevice] [int] NOT NULL,
	[ExportState] [int] NOT NULL,
	[Sequence] [nvarchar](max) NULL,
	[LocDesc] [bit] NOT NULL,
	[PrintoutsParms] [nvarchar](max) NULL,
	[Permission] [int] NOT NULL,
	[ReservationType] [int] NULL,
 CONSTRAINT [PK_dbo.ApiDefinitions] 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].[ApiDefinitions] ADD  DEFAULT ((0)) FOR [Permission]
GO


