SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

SET ANSI_PADDING ON

CREATE TABLE [dbo].[{TABLE_NAME}](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[redeem_code] [varchar](50) NOT NULL,
	[redeem_type] [varchar](50) 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 [PK_{TABLE_NAME}] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

SET ANSI_PADDING OFF

ALTER TABLE [dbo].[{TABLE_NAME}] ADD  CONSTRAINT [DF_{TABLE_NAME}_status]  DEFAULT ((0)) FOR [status]


