IF NOT EXISTS (
		SELECT *
		FROM sys.objects
		WHERE object_id = OBJECT_ID(N'[dbo].[EST_NF_ENT_AUDIT]')
			AND type IN (N'U')
		)
BEGIN
	CREATE TABLE [dbo].[EST_NF_ENT_AUDIT] (
		[CD_EMP] INT NOT NULL
		,[CD_FILIAL] INT NOT NULL
		,[CD_FORN] INT NOT NULL
		,[NM_FORN] VARCHAR(100) NOT NULL
		,[CD_NF] INT NOT NULL
		,[NR_NF] INT NOT NULL
		,[VLR_NF] MONEY NOT NULL
		,[CD_PROD] INT NOT NULL
		,[DS_PROD] VARCHAR(100) NOT NULL
		,[DT_ENT] DATETIME NOT NULL
		,[DT_EVENTO] DATETIME NOT NULL
		,[TP_EVENTO] VARCHAR(20) NOT NULL
		,[CD_NT_MOV] INT NOT NULL
		,[CD_NT_MOV_ANT] INT NOT NULL
		,[CD_USUARIO] INT )
END
