
CREATE TABLE [dbo].[T_EXPORT_TEMPLATE](
	[ReportFileFormat] [uniqueidentifier] NOT NULL,
	[ExportData] [uniqueidentifier] NOT NULL,
	[FileID] [uniqueidentifier] NOT NULL,
	[ProcessingWay] [int] NOT NULL,
	[OutputFormat] [int] NOT NULL,
	[OutputName] [varchar](255) NULL,
 CONSTRAINT [PK_T_EXPORT_TEMPLATE] PRIMARY KEY CLUSTERED 
(
	[FileID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO


ALTER TABLE [dbo].[T_EXPORT_TEMPLATE]  WITH NOCHECK ADD  CONSTRAINT [FK_T_FILES_T_EXPORT_TEMPLATE_FILEID] FOREIGN KEY([FileID])
REFERENCES [dbo].[T_FILES] ([FileID])
GO

ALTER TABLE [dbo].[T_EXPORT_TEMPLATE] CHECK CONSTRAINT [FK_T_FILES_T_EXPORT_TEMPLATE_FILEID]
GO

ALTER TABLE [dbo].[T_EXPORT_TEMPLATE]  WITH NOCHECK ADD  CONSTRAINT [FK_T_EXPORT_DATA_T_EXPORT_TEMPLATE_EXPORTDATA] FOREIGN KEY([ExportData])
REFERENCES [dbo].[T_EXPORT_DATA] ([ExportDataID])
GO

ALTER TABLE [dbo].[T_EXPORT_TEMPLATE] CHECK CONSTRAINT [FK_T_EXPORT_DATA_T_EXPORT_TEMPLATE_EXPORTDATA]
GO

ALTER TABLE [dbo].[T_EXPORT_TEMPLATE]  WITH NOCHECK ADD  CONSTRAINT [FK_T_REPORTFILEFORMAT_T_EXPORT_TEMPLATE_REPORTFILEFORMAT] FOREIGN KEY([ReportFileFormat])
REFERENCES [dbo].[T_ReportFileFormat] ([RepFmtID])
GO

ALTER TABLE [dbo].[T_EXPORT_TEMPLATE] CHECK CONSTRAINT [FK_T_REPORTFILEFORMAT_T_EXPORT_TEMPLATE_REPORTFILEFORMAT]
GO


