CREATE TABLE [dbo].[TipoListaPrelievo] (
    [CodTipoLista] NVARCHAR (10)  NOT NULL,
    [DescrLista]   NVARCHAR (250) NULL,
    [CodCella]     NVARCHAR (50)  NOT NULL,
    [CodEvento]    NVARCHAR (10)  NOT NULL,
    [toAs400]      BIT            CONSTRAINT [DF_TipoListaPrelievo_toAs400] DEFAULT ((1)) NULL,
    [enabled]      BIT            CONSTRAINT [DF_TipoListaPrelievo_enabled] DEFAULT ((0)) NULL,
    [codTipoObj]   NCHAR (1)      CONSTRAINT [DF_TipoListaPrelievo_codTipoObj] DEFAULT ('') NULL,
    CONSTRAINT [PK_TipoListaPrelievo] PRIMARY KEY CLUSTERED ([CodTipoLista] ASC),
    CONSTRAINT [FK_TipoListaPrelievo_AnagTipoEvento] FOREIGN KEY ([CodEvento]) REFERENCES [dbo].[AnagTipoEvento] ([CodEvento]) ON UPDATE CASCADE
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'NON MODIFICARE: nel codice si usano questi campi x chiamate...', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TipoListaPrelievo', @level2type = N'COLUMN', @level2name = N'CodEvento';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'tipo oggetto ("A" = anime, "P" = particolari)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TipoListaPrelievo', @level2type = N'COLUMN', @level2name = N'codTipoObj';

