/***** Object:  Table [dbo].[T_PLAN_REQUEST_SMO] *****/
CREATE TABLE [dbo].[T_PLAN_REQUEST_SMO](
	[PlanRequestSmoID] uniqueidentifier NOT NULL,
	[PlanRequest] uniqueidentifier NOT NULL,
	[Smo] varchar(5) NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO] WITH NOCHECK ADD CONSTRAINT [PK_T_PLAN_REQUEST_SMO]
PRIMARY KEY CLUSTERED ([PlanRequestSmoID]) ON [PRIMARY]
GO
        
ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_REQUEST_T_PLAN_REQUEST_SMO_PLANREQUEST] FOREIGN KEY([PlanRequest])
REFERENCES [dbo].[T_PLAN_REQUEST] ([PlanID])
GO
ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO] WITH NOCHECK ADD CONSTRAINT [FK_T_SMO_T_PLAN_REQUEST_SMO_SMO] FOREIGN KEY([Smo])
REFERENCES [dbo].[T_SMO] ([SMOCOD])
GO

/***** Object:  Table [dbo].[T_PLAN_REQUEST_SMO_ITEM] *****/
CREATE TABLE [dbo].[T_PLAN_REQUEST_SMO_ITEM](
	[PlanRequestSmo] uniqueidentifier NOT NULL,
	[MonthValuesID] uniqueidentifier NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO_ITEM] WITH NOCHECK ADD CONSTRAINT [PK_T_PLAN_REQUEST_SMO_ITEM]
PRIMARY KEY CLUSTERED ([MonthValuesID]) ON [PRIMARY]
GO
        
ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_PLAN_REQUEST_SMO_T_PLAN_REQUEST_SMO_ITEM_PLANREQUESTSMO] FOREIGN KEY([PlanRequestSmo])
REFERENCES [dbo].[T_PLAN_REQUEST_SMO] ([PlanRequestSmoID])
GO
ALTER TABLE [dbo].[T_PLAN_REQUEST_SMO_ITEM] WITH NOCHECK ADD CONSTRAINT [FK_T_MONTH_VALUES_T_PLAN_REQUEST_SMO_ITEM_MONTHVALUESID] FOREIGN KEY([MonthValuesID])
REFERENCES [dbo].[T_MONTH_VALUES] ([MonthValuesID])
GO

