

create table ta_prize (
prize_id             INTEGER      PRIMARY KEY AUTOINCREMENT,
prize_type           VARCHAR(100),
prize_name           VARCHAR(300),
picture              TEXT,
stock                INTEGER,
create_date          DATE
);


create table ta_prize_setting (
setting_id           INTEGER      PRIMARY KEY AUTOINCREMENT,
prize_id             INTEGER,
is_repeat            SMALLINT,
prize_num            INTEGER,
status               SMALLINT,
create_date          DATE
);


create table ta_user (
user_id              INTEGER      PRIMARY KEY AUTOINCREMENT,
user_name            VARCHAR(100),
user_org             VARCHAR(300),
user_dept            VARCHAR(300)
);

create table ta_prize_winner (
rec_id               INTEGER      PRIMARY KEY AUTOINCREMENT,
user_id              INTEGER,
user_name            VARCHAR(200),
user_org             VARCHAR(300),
user_dept            VARCHAR(300),
prize_id             INTEGER,
prize_name           VARCHAR(200),
prize_type           VARCHAR(100),
setting_id           INTEGER,
status               SMALLINT,
create_date          DATE
);
