CREATE TABLE [dbo].[{TABLE_NAME}](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [redeem_code] [varchar](50) NOT NULL,
    [redeem_type] [varchar](20) NOT NULL,
    [redeem_limit] [int] NULL,
    [redeem_user] [varchar](50) NULL,
    [redeem_credit_config_id] [int] NOT NULL,
    [redeem_credit_amount] [int] NOT NULL,
    [status] [tinyint] NOT NULL CONSTRAINT [DF_{TABLE_NAME}_status] DEFAULT ((0)),
    [created_at] [datetime] NOT NULL CONSTRAINT [DF_{TABLE_NAME}_created] DEFAULT (GETDATE()),
    CONSTRAINT [PK_{TABLE_NAME}] PRIMARY KEY CLUSTERED ([id] ASC)
);
CREATE UNIQUE NONCLUSTERED INDEX [UX_{TABLE_NAME}_code] ON [dbo].[{TABLE_NAME}] ([redeem_code] ASC);
