-- Tables

/***** Object:  Table [AKUZ].[T_LP_CONTR] *****/
CREATE TABLE [AKUZ].[T_LP_CONTR]
(
    [LpContrID] uniqueidentifier NOT NULL,
    [LekPrDateInjLink] uniqueidentifier NOT NULL,
    [LP_ED] uniqueidentifier NOT NULL,
    [ED_IZM] varchar(10) NOT NULL,
    [S_ED] decimal(15, 6) NOT NULL,
    [LP_EDKOL] decimal(8, 3) NOT NULL,
    [KOL_LP] int NOT NULL,
    [D_CONTR] datetime NOT NULL,
    [N_CONTR] varchar(25) NOT NULL
)
ON [PRIMARY]
GO

-- Alters

ALTER TABLE [AKUZ].[T_LP_CONTR] ADD CONSTRAINT [PK_T_LP_CONTR]
PRIMARY KEY CLUSTERED ([LpContrID]) ON [PRIMARY]
GO

ALTER TABLE [AKUZ].[T_LP_CONTR] ADD CONSTRAINT [FK_T_LEK_PR_DATE_INJ_LINK_T_LP_CONTR_LekPrDateInjLink]
FOREIGN KEY([LekPrDateInjLink]) REFERENCES [AKUZ].[T_LEK_PR_DATE_INJ_LINK] ([LekPrDateInjLinkID])
GO

ALTER TABLE [AKUZ].[T_LP_CONTR] ADD CONSTRAINT [FK_T_PACKAGE_TYPE_T_LP_CONTR_LP_ED]
FOREIGN KEY([LP_ED]) REFERENCES [PHARM].[T_PACKAGE_TYPE] ([PackageTypeID])
GO

