/***** Object:  Table [dbo].[T_FACT_ITEM] *****/
CREATE TABLE [dbo].[T_FACT_ITEM]
(
  [FactItemID] uniqueidentifier NOT NULL,
  [Smo] varchar(5) NOT NULL,
  [Mo] varchar(6) NOT NULL,
  [PlanParameter] uniqueidentifier NOT NULL,
  [PeriodSection] uniqueidentifier NOT NULL
) ON [PRIMARY]
GO

-- Alters

ALTER TABLE [dbo].[T_FACT_ITEM] WITH NOCHECK ADD CONSTRAINT [PK_T_FACT_ITEM]
PRIMARY KEY CLUSTERED ([FactItemID]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[T_FACT_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_SMO_T_FACT_ITEM_SMO] FOREIGN KEY([Smo])
REFERENCES [dbo].[T_SMO] ([SMOCOD])
GO
ALTER TABLE [dbo].[T_FACT_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_MO_T_FACT_ITEM_MO] FOREIGN KEY([Mo])
REFERENCES [dbo].[T_MO] ([MCOD])
GO
ALTER TABLE [dbo].[T_FACT_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_PARAMETER_T_FACT_ITEM_PLANPARAMETER] FOREIGN KEY([PlanParameter])
REFERENCES [dbo].[T_PLAN_PARAMETER] ([PayParametrID])
GO
ALTER TABLE [dbo].[T_FACT_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_PERIOD_SECTION_T_FACT_ITEM_PERIODSECTION] FOREIGN KEY([PeriodSection])
REFERENCES [dbo].[T_PERIOD_SECTION] ([PeriodSectionID])
GO


