
/****** Object:  Table [dbo].[ApiObjectLinesRelations]    Script Date: 06.09.2021 20:37:14 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ApiObjectLinesRelations](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ObjectType] [int] NOT NULL,
	[ObjectId] [int] NOT NULL,
	[ObjectLineId] [int] NOT NULL,
	[RelObjectType] [int] NOT NULL,
	[RelObjectId] [int] NOT NULL,
	[RelObjectLineId] [int] NOT NULL,
	[ItemId] [int] NOT NULL,
	[ItemCode] [nvarchar](max) NULL,
	[ItemName] [nvarchar](max) NULL,
	[Description] [nvarchar](max) NULL,
	[TS] [datetime] NOT NULL,
	[OperatorId] [int] NOT NULL,
	[Value] [decimal](18, 2) NOT NULL,
	[Quantity] [decimal](18, 2) NOT NULL,
	[HistoryParentId] [int] NOT NULL,
	[ObjectNumberString] [nvarchar](max) NULL,
	[RelObjectNumberString] [nvarchar](max) NULL,
 CONSTRAINT [PK_dbo.ApiObjectLinesRelations] 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


