CREATE TABLE [dbo].[ATImporterConfiguration]
(
    [Id] INT IDENTITY(1,1) NOT NULL,
    [Name] NVARCHAR(64) NOT NULL,
    [DocumentPath] NVARCHAR(512) NOT NULL,
    [ArchivePath] NVARCHAR(512) NOT NULL,
    [ErrorPath] NVARCHAR(512) NOT NULL,
    [LogPath] NVARCHAR(512) NOT NULL,
    [LoopPauseMinutes] INT NOT NULL DEFAULT 30,
    [LogRetentionDays] INT NOT NULL DEFAULT 7,
    [LogFileMaxSizeMB] INT NOT NULL DEFAULT 100,
    [CpuUsagePercentLimit] INT NOT NULL DEFAULT 80,
    [MaxPDFSizeMB] INT NOT NULL DEFAULT 20,
    [CleanArchiveIntervalDays] INT NOT NULL DEFAULT 30,
    [IsActive] BIT NOT NULL DEFAULT(1),

    CONSTRAINT PK_ATImporterConfiguration PRIMARY KEY ([Id]),
    CONSTRAINT UK_ATImporterConfiguration_Name UNIQUE ([Name])
);
GO
