/*
 Navicat Premium Dump SQL

 Source Server         : Test_Kitty_Fall_NATCOM
 Source Server Type    : Oracle
 Source Server Version : 120200 (Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production)
 Source Host           : localhost:1539
 Source Schema         : KITTY_NATCOM

 Target Server Type    : Oracle
 Target Server Version : 120200 (Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production)
 File Encoding         : 65001

 Date: 15/07/2026 14:03:27
*/


-- ----------------------------
-- Table structure for ACCOUNT_ADMIN
-- ----------------------------
DROP TABLE "ACCOUNT_ADMIN";
CREATE TABLE "ACCOUNT_ADMIN" (
  "ID" NUMBER VISIBLE,
  "USER_ADMIN" VARCHAR2(255 CHAR) VISIBLE,
  "PASS_ADMIN" VARCHAR2(255 CHAR) VISIBLE,
  "CREATED_DATE" DATE VISIBLE DEFAULT sysdate,
  "UPDATE_DATE" DATE VISIBLE DEFAULT sysdate,
  "STATUS" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'ACTIVE',
  "SERVICE_ID" NUMBER(10,0) VISIBLE DEFAULT 1,
  "ROLE" VARCHAR2(200 BYTE) VISIBLE DEFAULT 'USER'
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ACCOUNT_ADMIN
-- ----------------------------
INSERT INTO "ACCOUNT_ADMIN" VALUES ('1020', 'TEST', 'TEST', TO_DATE('2026-06-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-06-16 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 'ACTIVE', '1', 'TEST');
INSERT INTO "ACCOUNT_ADMIN" VALUES ('1', 'admin', '123456a@A', TO_DATE('2026-05-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-05-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 'ACTIVE', '1', 'ADMIN');
INSERT INTO "ACCOUNT_ADMIN" VALUES ('2', 'report', 'Report@123', TO_DATE('2026-05-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-05-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 'ACTIVE', '1', 'REPORT');
INSERT INTO "ACCOUNT_ADMIN" VALUES ('1000', 'user', '123456', TO_DATE('2026-05-12 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-05-12 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), 'ACTIVE', '1', 'USER');

-- ----------------------------
-- Table structure for ACCOUNT_INFO
-- ----------------------------
DROP TABLE "ACCOUNT_INFO";
CREATE TABLE "ACCOUNT_INFO" (
  "ID" NUMBER VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(200 BYTE) VISIBLE NOT NULL,
  "REFRESH_TOKEN" VARCHAR2(2000 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ACCOUNT_INFO
-- ----------------------------

-- ----------------------------
-- Table structure for ACCOUNT_USER
-- ----------------------------
DROP TABLE "ACCOUNT_USER";
CREATE TABLE "ACCOUNT_USER" (
  "ID" NUMBER VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 CHAR) VISIBLE,
  "USERS" VARCHAR2(255 CHAR) VISIBLE,
  "PASS" VARCHAR2(255 CHAR) VISIBLE,
  "SERVICE_ID" VARCHAR2(255 CHAR) VISIBLE,
  "CREATED_DATE" DATE VISIBLE DEFAULT sysdate,
  "UPDATE_DATE" DATE VISIBLE DEFAULT sysdate,
  "IS_ACTIVE" NUMBER(2,0) VISIBLE DEFAULT 1,
  "CHANNEL" VARCHAR2(1000 BYTE) VISIBLE DEFAULT 'USSD',
  "FREE_SPIN" NUMBER(10,0) VISIBLE DEFAULT 0,
  "TOTAL_SPIN" NUMBER(10,0) VISIBLE DEFAULT 0,
  "ROLE" VARCHAR2(100 BYTE) VISIBLE DEFAULT 'USER',
  "LANGUAGE" NUMBER(2,0) VISIBLE DEFAULT 1,
  "IS_LOCK" NUMBER(2,0) VISIBLE DEFAULT 0,
  "TOTAL_FALSE" NUMBER(5,0) VISIBLE DEFAULT 0,
  "TIME_LOCK" DATE VISIBLE DEFAULT sysdate,
  "LAST_UPDATE" DATE VISIBLE DEFAULT sysdate,
  "LAST_LOGIN" DATE VISIBLE DEFAULT sysdate,
  "POINT" NUMBER(10,0) VISIBLE DEFAULT 0,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 1,
  "PICTURE" VARCHAR2(500 CHAR) VISIBLE DEFAULT 'default.png',
  "FULLNAME" VARCHAR2(255 CHAR) VISIBLE,
  "EMAIL" VARCHAR2(255 CHAR) VISIBLE,
  "BIRTHDAY" DATE VISIBLE DEFAULT sysdate
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ACCOUNT_USER
-- ----------------------------
INSERT INTO "ACCOUNT_USER" VALUES ('1340', '95123456789', '95123456789', '388867', NULL, TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'), '1', 'USSD', '0', '0', 'USER', '1', '0', '0', TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'), '0', '1', NULL, NULL, NULL, TO_DATE('2026-07-07 16:23:44', 'SYYYY-MM-DD HH24:MI:SS'));

-- ----------------------------
-- Table structure for CHARGE_LOG
-- ----------------------------
DROP TABLE "CHARGE_LOG";
CREATE TABLE "CHARGE_LOG" (
  "ID" NUMBER VISIBLE,
  "MSISDN" VARCHAR2(255 CHAR) VISIBLE,
  "ACCOUNT_ID" VARCHAR2(255 CHAR) VISIBLE,
  "FEE" NUMBER(12,2) VISIBLE,
  "DESCRIPTION" CLOB VISIBLE,
  "CHARGE_TIME" DATE VISIBLE DEFAULT sysdate,
  "INSERT_TIME" DATE VISIBLE DEFAULT sysdate,
  "STATUS" NUMBER VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of CHARGE_LOG
-- ----------------------------
INSERT INTO "CHARGE_LOG" VALUES ('1000', '9587200090', NULL, '199', NULL, TO_DATE('2026-06-03 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-06-03 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "CHARGE_LOG" VALUES ('1020', '9589898989', NULL, '199', NULL, TO_DATE('2026-06-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-06-11 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "CHARGE_LOG" VALUES ('1040', '95123456789', NULL, '177', 'Register Kitty_Fall_DAYLY', TO_DATE('2026-07-08 13:41:41', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-08 13:41:40', 'SYYYY-MM-DD HH24:MI:SS'), '1');

-- ----------------------------
-- Table structure for CONFIG
-- ----------------------------
DROP TABLE "CONFIG";
CREATE TABLE "CONFIG" (
  "MODULE" NVARCHAR2(100) VISIBLE,
  "PARAM_NAME" NVARCHAR2(50) VISIBLE,
  "PARAM_VALUE" NVARCHAR2(1024) VISIBLE,
  "PARAM_VALUE_FR" NVARCHAR2(1024) VISIBLE,
  "NOTE" NVARCHAR2(1024) VISIBLE,
  "DEFAULT_VALUE" VARCHAR2(4000 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of CONFIG
-- ----------------------------
INSERT INTO "CONFIG" VALUES ('PROCESS', 'GIFT_FRIEND_SUCCESS', 'Ou voye %spin% Vire  pou %friend%.avek sikse.Ou peye%money% HTG. Zanmil lan ap kontan anpil! Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_MULTIPLE_SPIN', 'Ou genyen doub vire. Konnye a ou genyen %spin% vire.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_RESET_SPIN', 'Malerezman , Ou pedi vire yo.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SCAN_MT_TIME', '00:00:00-23:59:59', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'RESPONSE_BUSY', '5000', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'MSG_OVER_LOAD', 'MSG_OVER_LOAD', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'REQUEST_EXIST', 'REQUEST_EXIST', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'SYSTEM_FAIL', 'SYSTEM_FAIL', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'SYNTAXERROR', 'SYNTAXERROR', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'EXPIRE', '0', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('RECEIVER', 'PENDING', '0', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SQL_REPORT_HOURLY', 'select ''Report date: ''  || to_char(sysdate,''dd/mm/yyyy'') 
|| '' '' || to_char(sysdate,''HH24'') || ''h''
|| ''
Revenue: '' || revenue || ''
Register new: '' || count_reg || ''
Deactive: '' || count_deactive|| ''
Total active: '' || count_active|| ''
Winner money: '' || paid_money|| ''
Winner count: '' || winner
from 
(select * from 
(
(select nvl(sum(fee),0) revenue from charge_log where charge_time >= trunc(sysdate) and charge_time < sysdate)
left join
(select count(*) count_reg from reg_info where register_time >= trunc(sysdate) and register_time < sysdate) on 1=1
left join
(select nvl(sum(money),0) paid_money, count (distinct msisdn) winner from history_play where  play_day >= trunc(sysdate) and play_day < sysdate) on 1=1
left join 
(select count(*) count_active from reg_info where status = 1) on 1=1
left join 
(select count(*) count_deactive from reg_info where status = 0 and end_time >= trunc(sysdate) and end_time < sysdate) on 1=1
) ) a', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_WEEKLY', 'Felisitasyon! Ou anrejistre Lucky Draw avek sikse. Pri a se 15 HTG/semen. Ou gen 5 woulet/jou, achte plis: 2HTG/3 woulet. Ale sou https://guesssong.tls.tl pou anrejistre sevis epi gen yon chans pou jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_MONTHLY', 'Felisitasyon! Ou anrejistre Lucky Draw avek sikse. Pri a se 45 HTG/Mwa. Ou gen 5 woulet/jou, achte plis: 2HTG/3 woulet. Ale sou https://guesssong.tls.tl pou anrejistre sevis epi gen yon chans pou jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RECHARGE_GIFT', 'WAW! Konnye a ou ka jwe Lawoulet  epi genyen gwo prim p. Pou plis enfomasyon sou sevis la voye HELP nan 7878. Pouw komanse jwe avek kado a tape *7878*2# Mesi !', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'MONEY_LIMIT', '25000', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SQL_DISABLE_SERVICE', 'update REG_INFO set status=0 where MSISDN=? and status = 1', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_LOSE_SPIN', 'Ou jwe woulet nan BONCHANS. Tanpri kontinye jwe woulet pou gen yon chans jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_REMAIN_SPIN_REG_GIFT', 'Kado vire ou rete a se %giftSpin%
Vire ou rete apre anrejistreman an se %regSpin%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_REMAIN_SPIN_REG', 'Vire ou rete apre anrejistreman an se %regSpin% ', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_REMAIN_SPIN_GIFT', 'Kado vire ou rete a se %giftSpin%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_REMAIN_NO_SPIN', 'Ou pa genyen vire .Tanpri achte pouw ka kontinye jwe. Mesi ', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'NOT_ENOUGH_POINT', 'Pwen ou piti', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WAIT_INVITE_FRIEND', 'Tanpri mete nimewo zanmi ou an. Ou pral resevwa 5 pwen pou envitasyon avek sikse.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INVITE_POINT', '5', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_INVITE_FRIEND', 'Felisitasyon! Ou envite %phone% avek sikse epi li resevwa 5 pwen. Zanmi ou an pral kontan! Mesi.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'CHANGE_POINT_SUCCESS', 'Ou konveti %point% pwen pou jwenn %money% HTG avek sikse. Bon chans!
Ale sou https://guesssong.tls.tl jwi jwet la epi jwenn chans pou genyen gwo prim. Bon Chans!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RECEIVED_INVITATION', '%phone% envite w nan sevis WHEELING BINGO. Ale sou https://guesssong.tls.tl pou anrejistre sevis la epi gen yon chans pou jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_MULTIPLE_POINT', 'Felisitasyon! Ou genyen X2.Ou ka konveti 10 pwen pouw resevwa 1 HTG Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_USSD_WEEKLY', 'Felisitasyon! Ou anrejistre Lucky Draw avek sikse. Pri a se 15 HTG/semen. Ou gen 5 woulet/jou, achte plis: 2HTG/3 woulet. Ale sou https://guesssong.tls.tl pou anrejistre sevis epi gen yon chans pou jwenn gwo pri. Modpas ou se %password%. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_MULTIPLE_SCORE', 'Congratulation! You got double your scores. Your total score is %score%. You still have a chance to win the prize today. Good luck to you!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_SPIN', 'Felisitasyon! Ou gen %added_spin% woulet gratis. Tanpri kontinye jwe woulet pou gen yon chans jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INTRODUCE_MESSAGE', 'Lucky Draw se yon s vis kote itilizate an selman bezwen konekte ak nimewo Natcom nan epi peze Spin pou jwen yon woulet, kounya se kapab chans paw pou jwenn rekonpans lan. Pake jounalye: fe *556*1#, fre 5 HTG/jou ak 5 woulet gratis. Pake semen: fe *556*7 #, fr  15 HTG/sem n ak 5 woulet gratis/jou. Pake mwa: fe *556*30#, fr  45 HTG/mwa ak 5 woulet gratis/jou. Pou anile s vis lan , fe *556*0#. Ou ka konv ti 10 pwen pou ka resevwa 1 HTG. Ale sou http://luckydraw.natcom.com.ht pou anrejistre sevis la epi gen yon chans pou jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_CURRENT_RANKING', 'Konnye a ran ou se %rank%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'CONFIRM_GIFT_FRIEND', 'Voye %spin% vire pou zanmi. Wap peye %money% HTG.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('FREE_LIMIT', 'APPLICATIONS_PER_DAY', '3', NULL, 'So lan ung tuyen toi da/ngay cho Free user', '3');
INSERT INTO "CONFIG" VALUES ('FREE_LIMIT', 'CV_OPERATIONS_PER_DAY', '2', NULL, 'So lan tao/sua CV toi da/ngay cho Free user', '2');
INSERT INTO "CONFIG" VALUES ('FREE_LIMIT', 'APPLICATIONS_PER_DAY ', '3', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SQL_REPORT', 'select ''Report date: '' ||to_char(sysdate-1,''dd/mm/yyyy'') 
|| ''
Revenue: '' || revenue || ''
Register new: '' || count_reg || ''
Deactive: '' || count_deactive|| ''
Total active: '' || count_active|| ''
Winner money: '' || paid_money|| ''
Winner count: '' || winner
from 
(select * from 
(
(select nvl(sum(fee),0) revenue from charge_log where charge_time >= trunc(sysdate-1) and charge_time < trunc(sysdate))
left join
(select count(*) count_reg from reg_info where register_time >= trunc(sysdate-1) and register_time < trunc(sysdate)) on 1=1
left join
(select nvl(sum(money),0) paid_money, count (distinct msisdn) winner from history_play where  play_day >= trunc(sysdate-1) and play_day < trunc(sysdate)) on 1=1
left join 
(select count(*) count_active from reg_info where status = 1) on 1=1
left join 
(select count(*) count_deactive from reg_info where status = 0 and end_time >= trunc(sysdate-1) and end_time < trunc(sysdate)) on 1=1
) ) a', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'LIST_RECEIVE_REPORT', '50933123456,50940240715', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'CHANNEL', '1542', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'COUNTRY_CODE', '509', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SPIN_FEE', '0.6667', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'WRONG_SYNTAX', 'Wrong syntax!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ACCOUNT_BLOCKED_RES', '55', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'LIST_SUCCESS_RES', '0,100', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'NOT_ENOUGH_MONEY_RES', '55', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ERROR', 'Error!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'CHARGE_FEE_SUCCESS', 'Buying one more time to play successful. Fee is 1HTG.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'NOT_ENOUGH_BALANCE', 'You have not enough money to %action%.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SYSTEM_FAIL', 'System fail. Try again later!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'LIST_CANCEL_SUCCESS_RES', '0,411,511,414', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_LOSE_TURN_UNSUB', 'Ou jwe woulet nan BONCHANS. Tanpri kontinye jwe woulet pou gen yon chans jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_POINT', 'Felisitasyon! Ou genyen %point%. Ou ka konveti 10 pwen pouw resevwa 1 HTG. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ADD_SPIN_FEE', '3', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'MIN_POINT_TO_ADD_WEEKLY_PRIZE', '2', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXCHANGE_SUCCESS_DAILY', 'Exchange top %top%  to   %money% HTG  TYpe  %type%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXCHANGE_SUCCESS_WEEKLY', 'Exchange top %top%  to   %money% HTG  TYpe  %type%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXCHANGE_SUCCESS_MONTHLY', 'Exchange top %top%  to   %money% HTG  TYpe  %type%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_USSD_MONTHLY', 'Felisitasyon! Ou anrejistre Lucky Draw avek sikse. Pri a se 45 HTG/Mwa. Ou gen 5 woulet/jou, achte plis: 2HTG/3 woulet. Ale sou https://guesssong.tls.tl pou anrejistre sevis epi gen yon chans pou jwenn gwo pri. Modpas ou se %password%. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_USSD_DAILY', 'Felisitasyon! Ou anrejistre Lucky Draw avek sikse. Pri a se 5 HTG/jou. Ou gen 5 woulet/jou, achte plis: 2HTG/3 woulet. Ale sou https://guesssong.tls.tl pou anrejistre sevis epi gen yon chans pou jwenn gwo pri. Modpas ou se %password%. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RECEIVER_GIFT', 'WAW! Zanmiw %msisdn% voye %spin% pou wou! Konnye a ou ka jwe Lawoulet  epi genyen gwo prim p. Pou plis enfomasyon sou sevis la voye  HELP nan 7878. Pouw komanse jwe avek kado a tape *7878*2# Mesi !', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RENEW_SPIN_SUCCESS', 'Ou gen 5 woulet pou jodi a. Ale sou https://guesssong.tls.tl jwi jwet la epi jwenn chans pou genyen gwo prim. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXTEND_PACKAGE_SUCCESS_WEEKLY', 'Ou renouvle sevis LUCKY DRAW avek sikse. Pri a se 15HTG/ 35woulet gratis/semen. Ale sou https://guesssong.tls.tl yo jwi jwet la epi yo gen yon chans jwenn pri gwo. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXTEND_PACKAGE_SUCCESS_MONTHLY', 'Ou renouvle sevis LUCKY DRAW avek sikse. Pri a se 45HTG/ 150woulet gratis/mwa. Ale sou https://guesssong.tls.tl yo jwi jwet la epi yo gen yon chans jwenn pri gwo. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_ADDRESS', '127.0.0.1', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_ACCOUNT', 'test', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_PASS', '123456a@', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_PATH', '/cdr_test', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_DOWNLOADED_PATH', 'H:/ftp_client', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_RECHARGE_ADDRESS', '127.0.0.1', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_RECHARGE_ACCOUNT', 'test', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_RECHARGE_PASS', '123456a@', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_RECHARGE_PATH', '/cdr_test/recharge', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FTP_RECHARGE_DOWNLOADED_PATH', 'H:/ftp_client/recharge', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ADD_SPIN_TIMES', '3', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'BUY_SPIN_SUB_SUCCESS', 'Ou gen 3 vire an plis. Fre 2HTG. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_SCORE_WINNER', 'Kantite vire a se %spin%. Pi gwo kantite a se %spin%.Wap gen chans genyen prim Jodia!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'DISABLE_SUCCESS', 'Ou anile sevis Lawoullet la avek sikse. Pou anrejistre anko, rele *556*1#, *556*7#, *556*30#. Tounen vin jwenn nou pouw kapab genyen gwo prim. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'DISABLE_NOT_REGISTER', 'Ou poko anrejistre nan sevis Lawoullet la. Pou anrejistre sevis la rele *556*1#, *556*7#, *556*30#. Epi swiv enstriksyon yo .Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RANKING_PRIZE_SUCCESS', 'Felisitasyon! Ou genyen %money%HTG sou kont de baz ou ak %spin% vire e pozisyon %rank%. Pouw verifye, Tanpri , Tape *556# . Mesi', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_TIMES_UNSUB', 'Felisitasyon! Ou genyen 1 vire an plis. Kantite vire a se %spin%.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'MIN_POINT_TO_ADD_MONTHLY_PRIZE', '2', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ADD_MONEY_SUCCESS', 'Parabens, Ita simu ona %money%$ aumenta iha ita nia data hodi asesu ba internet husi servisu Sik Muzika. Obrigadu!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ADD_DATA_SUCCESS', 'Parabens, Ita simu ona %data%MB aumenta iha ita nia data hodi asesu ba internet husi servisu Sik Muzika. Obrigadu!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'SEND_OTP_SUCCESS', 'Your new OTP is: %otp%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RESEND_OTP_SUCCESS', 'Your new OTP is: %otp%', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INVITED_MESSAGE', 'Zanmiw %msisdn% envitew itilize sevis LUCKY DRAW Natcom.Tape *556# pou plis enfomasyon.
Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'FRIEND_ALREADY_REGISTERED', 'Zanmiw %friend% ap itilize sevis la deja. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'ALREADY_REGISTERED', 'You have already registered %package%!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS', 'Register success!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'CREATE_ACCOUNT_SUCCESS', 'Your account is your number. Your password is %password%. 
	Go to https://guesssong.tls.tl to enjoy a fun time with hundreds of different quizzes and have a chance to get up to 500 HTG daily. Thank you.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INVITE_SUCCESS', 'Invite %msisdn% successful. Please visit https://guesssong.tls.tl to check your reward.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'REGISTER_SUCCESS_USSD', 'Registered by USSD successful! Fee is %fee%. Your password is %password%. This package will be expired after %expire%. Please visit http://funquiz.natcom.com.ht to play your games.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RESET_PASSWORD_SUCCESS', 'Reset password successful. Your new password is %password%.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXTEND_PACKAGE_SUCCESS', 'Your account have been renewed successful.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RENEW_SUCCESS', 'Your account have been renewed successful.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INVITE_FRIEND_SUCCESS', 'Invite %msisdn% successful. Please visit https://guesssong.tls.tl to check your reward.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'EXCHANGE_SUCCESS', 'Exchange %point% points to %money% HTG successful ', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_MONEY_UNSUB', 'Felisitasyon! Ou genyen %money% %unit%. Anrejistre nan sevis la pouw ka genyen 300HTG.
Bon Chans!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_TIMES', 'Felisitasyon! Ou genyen %added_spin% vire an plis. Kantite vire a se %spin%.', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_LOSE_TURN', 'Ou jwe woulet nan BONCHANS. Tanpri kontinye jwe woulet pou gen yon chans jwenn gwo pri. Mesi!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'INVITE_TO_SPIN', 'Ou genyen %number% Vire pou kounya. Eske ou vle Vire kounya?', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_ADD_SCORE', 'Congratulation! You got %description% score. Your total score is %score%. You still have a chance to win the prize today. Good luck to you!', NULL, NULL, NULL);
INSERT INTO "CONFIG" VALUES ('PROCESS', 'RETURN_WIN_RESET_SCORE', 'Sorry! You have lost all your score. Your total score is  0. You still have a chance to win the prize today. Good luck to you!', NULL, NULL, NULL);

-- ----------------------------
-- Table structure for GAME_LEVEL_ATTEMPT
-- ----------------------------
DROP TABLE "GAME_LEVEL_ATTEMPT";
CREATE TABLE "GAME_LEVEL_ATTEMPT" (
  "ATTEMPT_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "SESSION_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ROOT_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "CHILD_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "PARENT_CHILD_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "LEVEL_NO" NUMBER(3,0) VISIBLE NOT NULL,
  "ATTEMPT_NO" NUMBER(5,0) VISIBLE DEFAULT 1 NOT NULL,
  "EXPECTED_SCORE" NUMBER(10,0) VISIBLE DEFAULT 0 NOT NULL,
  "CLIENT_SCORE" NUMBER(10,0) VISIBLE,
  "AWARDED_SCORE" NUMBER(10,0) VISIBLE DEFAULT 0 NOT NULL,
  "REWARD_OPTION_ID" NUMBER(12,0) VISIBLE,
  "REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE,
  "REWARD_VALUE" NUMBER(12,2) VISIBLE,
  "REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 1 NOT NULL,
  "START_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "SUBMIT_TIME" DATE VISIBLE,
  "SERVER_DURATION_SECONDS" NUMBER(10,0) VISIBLE,
  "CLIENT_DURATION_SECONDS" NUMBER(10,0) VISIBLE,
  "IS_VALID" NUMBER(1,0) VISIBLE,
  "VALIDATE_CODE" VARCHAR2(50 BYTE) VISIBLE,
  "VALIDATE_MESSAGE" VARCHAR2(500 BYTE) VISIBLE,
  "REQUEST_HASH" VARCHAR2(128 BYTE) VISIBLE,
  "NONCE" VARCHAR2(100 BYTE) VISIBLE,
  "RAW_REQUEST" CLOB VISIBLE,
  "RAW_RESPONSE" CLOB VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."ATTEMPT_ID" IS 'Khoa chinh lan choi level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."SESSION_ID" IS 'Session cha cua level attempt';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."ROOT_TRANS_ID" IS 'Ma giao dich goc cua session';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."CHILD_TRANS_ID" IS 'Ma giao dich con cua rieng level attempt, dung de submit mot lan';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."PARENT_CHILD_TRANS_ID" IS 'Child trans cha neu attempt duoc tao do retry/rescue';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."MSISDN" IS 'So thue bao choi level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."MODE_ID" IS 'Che do choi cua level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."LEVEL_NO" IS 'So level dang choi';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."ATTEMPT_NO" IS 'Lan attempt cua level trong session, dung cho retry/rescue';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."EXPECTED_SCORE" IS 'Diem server du kien cong theo cau hinh level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."CLIENT_SCORE" IS 'Diem client submit, chi dung de doi chieu va audit';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."AWARDED_SCORE" IS 'Diem base server thuc su cong cho level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."REWARD_OPTION_ID" IS 'Option thuong duoc chon neu level la milestone';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."REWARD_TYPE" IS 'Loai thuong thuc te: DATA, LOYALTY, SCORE, MONEY';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."REWARD_VALUE" IS 'Gia tri thuong thuc te';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."REWARD_UNIT" IS 'Don vi thuong thuc te';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."STATUS" IS 'Trang thai attempt: 0 CREATED, 1 PLAYING, 2 COMPLETED, 3 FAILED, 4 TIMEOUT, 5 INVALID, 6 REPLACED';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."START_TIME" IS 'Thoi diem server tao attempt/bat dau level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."SUBMIT_TIME" IS 'Thoi diem server nhan submit level';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."SERVER_DURATION_SECONDS" IS 'Thoi gian choi tinh theo server';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."CLIENT_DURATION_SECONDS" IS 'Thoi gian choi client gui len';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."IS_VALID" IS 'Ket qua validate submit: 1 hop le, 0 khong hop le';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."VALIDATE_CODE" IS 'Ma ket qua validate';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."VALIDATE_MESSAGE" IS 'Mo ta ket qua validate';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."REQUEST_HASH" IS 'Hash request submit de phat hien replay/trung lap';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."NONCE" IS 'Nonce phat cho client de chong replay';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."RAW_REQUEST" IS 'Noi dung request goc neu can audit';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."RAW_RESPONSE" IS 'Noi dung response goc neu can audit';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_LEVEL_ATTEMPT"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_LEVEL_ATTEMPT" IS 'Lich su choi tung level trong mot session';

-- ----------------------------
-- Records of GAME_LEVEL_ATTEMPT
-- ----------------------------
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('2', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-1-1', NULL, '95123456789', '1', '1', '1', '10', '0', '10', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:13:33', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:13:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":1,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:13:33', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('3', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-2-1', NULL, '95123456789', '1', '2', '1', '10', '0', '10', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:13:57', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:13:57', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":2,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:13:57', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('4', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-3-1', NULL, '95123456789', '1', '3', '1', '10', '0', '10', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:14:05', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:05', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":3,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:05', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('5', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-4-1', NULL, '95123456789', '1', '4', '1', '10', '0', '10', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:14:12', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:12', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":4,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:12', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('6', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-5-1', NULL, '95123456789', '1', '5', '1', '0', '0', '0', '1', 'DATA', '5', 'MB', '2', TO_DATE('2026-07-09 11:14:21', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:21', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":5,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:21', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('7', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-6-1', NULL, '95123456789', '1', '6', '1', '15', '0', '15', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:14:29', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:29', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":6,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:29', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('8', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-7-1', NULL, '95123456789', '1', '7', '1', '15', '0', '15', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:14:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":7,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:44', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('9', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-8-1', NULL, '95123456789', '1', '8', '1', '15', '0', '15', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:14:51', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:14:51', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":8,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:14:51', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('10', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-9-1', NULL, '95123456789', '1', '9', '1', '15', '0', '15', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:15:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:15:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":9,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:15:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('11', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-10-1', NULL, '95123456789', '1', '10', '1', '0', '0', '0', '4', 'DATA', '10', 'MB', '2', TO_DATE('2026-07-09 11:15:09', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:15:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":10,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:15:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('12', '3', 'c200e194c97647ea9662f638283bf331', 'c200e194c97647ea9662f638283bf331-11-1', NULL, '95123456789', '1', '11', '1', '20', '0', '20', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:15:41', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:15:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"c200e194c97647ea9662f638283bf331","level":11,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:15:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('13', '5', '08c7c372faba4c5e8c8fd497078f0d9d', '08c7c372faba4c5e8c8fd497078f0d9d-11-1', NULL, '95123456789', '1', '11', '1', '20', '0', '20', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:19:50', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:19:50', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"08c7c372faba4c5e8c8fd497078f0d9d","level":11,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:19:50', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('14', '5', '08c7c372faba4c5e8c8fd497078f0d9d', '08c7c372faba4c5e8c8fd497078f0d9d-12-1', NULL, '95123456789', '1', '12', '1', '20', '0', '20', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:20:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:20:11', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"08c7c372faba4c5e8c8fd497078f0d9d","level":12,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:20:11', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('15', '5', '08c7c372faba4c5e8c8fd497078f0d9d', '08c7c372faba4c5e8c8fd497078f0d9d-13-1', NULL, '95123456789', '1', '13', '1', '20', '0', '20', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:20:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:20:24', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"08c7c372faba4c5e8c8fd497078f0d9d","level":13,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:20:24', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('16', '5', '08c7c372faba4c5e8c8fd497078f0d9d', '08c7c372faba4c5e8c8fd497078f0d9d-14-1', NULL, '95123456789', '1', '14', '1', '20', '0', '20', NULL, NULL, NULL, NULL, '2', TO_DATE('2026-07-09 11:20:35', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:20:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"08c7c372faba4c5e8c8fd497078f0d9d","level":14,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:20:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_ATTEMPT" VALUES ('17', '5', '08c7c372faba4c5e8c8fd497078f0d9d', '08c7c372faba4c5e8c8fd497078f0d9d-15-1', NULL, '95123456789', '1', '15', '1', '0', '0', '0', '7', 'DATA', '20', 'MB', '2', TO_DATE('2026-07-09 11:20:47', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:20:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', 'SUCCESS', NULL, NULL, NULL, '{"token":"[REDACTED],"msisdn":"95123456789","transId":"08c7c372faba4c5e8c8fd497078f0d9d","level":15,"score":0,"gameType":"Easy","gameOver":0,"language":"en"}', NULL, TO_DATE('2026-07-09 11:20:47', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_LEVEL_CONFIG
-- ----------------------------
DROP TABLE "GAME_LEVEL_CONFIG";
CREATE TABLE "GAME_LEVEL_CONFIG" (
  "LEVEL_CONFIG_ID" NUMBER(12,0) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "LEVEL_NO" NUMBER(3,0) VISIBLE NOT NULL,
  "BASE_SCORE" NUMBER(10,0) VISIBLE DEFAULT 0 NOT NULL,
  "TIME_LIMIT_SECONDS" NUMBER(5,0) VISIBLE NOT NULL,
  "IS_MILESTONE" NUMBER(1,0) VISIBLE DEFAULT 0 NOT NULL,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."LEVEL_CONFIG_ID" IS 'Khoa chinh cau hinh level';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."MODE_ID" IS 'Che do choi, tham chieu GAME_MODE';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."LEVEL_NO" IS 'So level tu 1 den 50';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."BASE_SCORE" IS 'Diem base cong khi qua level hop le';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."TIME_LIMIT_SECONDS" IS 'Thoi gian toi da cua level tinh bang giay';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."IS_MILESTONE" IS 'Danh dau level moc co thuong: 1 co thuong, 0 level thuong';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."STATUS" IS 'Trang thai cau hinh: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_LEVEL_CONFIG"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_LEVEL_CONFIG" IS 'Cau hinh diem va thoi gian cho tung level cua tung mode';

-- ----------------------------
-- Records of GAME_LEVEL_CONFIG
-- ----------------------------
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('1', '1', '1', '10', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('2', '1', '2', '10', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('3', '1', '3', '10', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('4', '1', '4', '10', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('5', '1', '5', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('6', '1', '6', '15', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('7', '1', '7', '15', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('8', '1', '8', '15', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('9', '1', '9', '15', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('10', '1', '10', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('11', '1', '11', '20', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('12', '1', '12', '20', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('13', '1', '13', '20', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('14', '1', '14', '20', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('15', '1', '15', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('16', '1', '16', '25', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('17', '1', '17', '25', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('18', '1', '18', '25', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('19', '1', '19', '25', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('20', '1', '20', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('21', '1', '21', '35', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('22', '1', '22', '35', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('23', '1', '23', '35', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('24', '1', '24', '35', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('25', '1', '25', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('26', '1', '26', '45', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('27', '1', '27', '45', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('28', '1', '28', '45', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('29', '1', '29', '45', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('30', '1', '30', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('31', '1', '31', '55', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('32', '1', '32', '55', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('33', '1', '33', '55', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('34', '1', '34', '55', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('35', '1', '35', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('36', '1', '36', '65', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('37', '1', '37', '65', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('38', '1', '38', '65', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('39', '1', '39', '65', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('40', '1', '40', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('41', '1', '41', '80', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('42', '1', '42', '80', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('43', '1', '43', '80', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('44', '1', '44', '80', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('45', '1', '45', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('46', '1', '46', '100', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('47', '1', '47', '100', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('48', '1', '48', '100', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('49', '1', '49', '100', '150', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('50', '1', '50', '0', '150', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('51', '2', '1', '20', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('52', '2', '2', '20', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('53', '2', '3', '20', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('54', '2', '4', '20', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('55', '2', '5', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('56', '2', '6', '25', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('57', '2', '7', '25', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('58', '2', '8', '25', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('59', '2', '9', '25', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('60', '2', '10', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('61', '2', '11', '30', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('62', '2', '12', '30', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('63', '2', '13', '30', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('64', '2', '14', '30', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('65', '2', '15', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('66', '2', '16', '35', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('67', '2', '17', '35', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('68', '2', '18', '35', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('69', '2', '19', '35', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('70', '2', '20', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('71', '2', '21', '40', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('72', '2', '22', '40', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('73', '2', '23', '40', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('74', '2', '24', '40', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('75', '2', '25', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('76', '2', '26', '50', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('77', '2', '27', '50', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('78', '2', '28', '50', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('79', '2', '29', '50', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('80', '2', '30', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('81', '2', '31', '60', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('82', '2', '32', '60', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('83', '2', '33', '60', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('84', '2', '34', '60', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('85', '2', '35', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('86', '2', '36', '70', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('87', '2', '37', '70', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('88', '2', '38', '70', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('89', '2', '39', '70', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('90', '2', '40', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('91', '2', '41', '80', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('92', '2', '42', '80', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('93', '2', '43', '80', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('94', '2', '44', '80', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('95', '2', '45', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('96', '2', '46', '100', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('97', '2', '47', '100', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('98', '2', '48', '100', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('99', '2', '49', '100', '100', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('100', '2', '50', '0', '100', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('101', '3', '1', '40', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('102', '3', '2', '40', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('103', '3', '3', '40', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('104', '3', '4', '40', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('105', '3', '5', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('106', '3', '6', '50', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('107', '3', '7', '50', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('108', '3', '8', '50', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('109', '3', '9', '50', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('110', '3', '10', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('111', '3', '11', '60', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('112', '3', '12', '60', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('113', '3', '13', '60', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('114', '3', '14', '60', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('115', '3', '15', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('116', '3', '16', '70', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('117', '3', '17', '70', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('118', '3', '18', '70', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('119', '3', '19', '70', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('120', '3', '20', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('121', '3', '21', '85', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('122', '3', '22', '85', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('123', '3', '23', '85', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('124', '3', '24', '85', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('125', '3', '25', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('126', '3', '26', '100', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('127', '3', '27', '100', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('128', '3', '28', '100', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('129', '3', '29', '100', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('130', '3', '30', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('131', '3', '31', '120', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('132', '3', '32', '120', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('133', '3', '33', '120', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('134', '3', '34', '120', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('135', '3', '35', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('136', '3', '36', '140', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('137', '3', '37', '140', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('138', '3', '38', '140', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('139', '3', '39', '140', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('140', '3', '40', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('141', '3', '41', '160', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('142', '3', '42', '160', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('143', '3', '43', '160', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('144', '3', '44', '160', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('145', '3', '45', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('146', '3', '46', '180', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('147', '3', '47', '180', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('148', '3', '48', '180', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('149', '3', '49', '180', '60', '0', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_CONFIG" VALUES ('150', '3', '50', '0', '60', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_LEVEL_REWARD_OPTION
-- ----------------------------
DROP TABLE "GAME_LEVEL_REWARD_OPTION";
CREATE TABLE "GAME_LEVEL_REWARD_OPTION" (
  "REWARD_OPTION_ID" NUMBER(12,0) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "LEVEL_NO" NUMBER(3,0) VISIBLE NOT NULL,
  "REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "REWARD_VALUE" NUMBER(12,2) VISIBLE NOT NULL,
  "REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "WEIGHT" NUMBER(10,0) VISIBLE DEFAULT 1 NOT NULL,
  "IS_DEFAULT" NUMBER(1,0) VISIBLE DEFAULT 0 NOT NULL,
  "REWARD_DESC" NVARCHAR2(500) VISIBLE,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."REWARD_OPTION_ID" IS 'Khoa chinh option thuong';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."MODE_ID" IS 'Che do choi, tham chieu GAME_MODE';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."LEVEL_NO" IS 'Level moc ap dung option thuong';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."REWARD_TYPE" IS 'Loai thuong: DATA, LOYALTY, SCORE, MONEY';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."REWARD_VALUE" IS 'Gia tri thuong';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."REWARD_UNIT" IS 'Don vi thuong: MB, POINT, MMK hoac don vi khac';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."WEIGHT" IS 'Trong so random option thuong, so cang lon ti le cang cao';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."IS_DEFAULT" IS 'Danh dau option mac dinh neu khong random duoc';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."REWARD_DESC" IS 'Mo ta option thuong hien thi/audit';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."STATUS" IS 'Trang thai option: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_LEVEL_REWARD_OPTION"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_LEVEL_REWARD_OPTION" IS 'Danh sach option thuong cua cac level moc';

-- ----------------------------
-- Records of GAME_LEVEL_REWARD_OPTION
-- ----------------------------
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('1', '1', '5', 'MONEY', '1', 'HTG', '1', '0', 'Easy level 5 reward data 5MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('3', '1', '5', 'SCORE', '20', 'POINT', '1', '0', 'Easy level 5 reward score 20 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('4', '1', '10', 'MONEY', '2', 'HTG', '1', '0', 'Easy level 10 reward data 10MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('6', '1', '10', 'SCORE', '40', 'POINT', '1', '0', 'Easy level 10 reward score 40 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('7', '1', '15', 'MONEY', '3', 'HTG', '1', '0', 'Easy level 15 reward data 20MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('9', '1', '15', 'SCORE', '70', 'POINT', '1', '0', 'Easy level 15 reward score 70 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('10', '1', '20', 'MONEY', '4', 'HTG', '1', '0', 'Easy level 20 reward data 40MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('11', '1', '20', 'SCORE', '100', 'POINT', '1', '0', 'Easy level 20 reward score 100 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('12', '1', '25', 'MONEY', '5', 'HTG', '1', '0', 'Easy level 25 reward data 70MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('14', '1', '25', 'SCORE', '140', 'POINT', '1', '0', 'Easy level 25 reward score 140 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('15', '1', '30', 'MONEY', '6', 'HTG', '1', '0', 'Easy level 30 reward data 100MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('17', '1', '30', 'SCORE', '180', 'POINT', '1', '0', 'Easy level 30 reward score 180 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('18', '1', '35', 'MONEY', '7', 'HTG', '1', '0', 'Easy level 35 reward data 120MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('20', '1', '35', 'SCORE', '230', 'POINT', '1', '0', 'Easy level 35 reward score 230 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('21', '1', '40', 'MONEY', '8', 'HTG', '1', '0', 'Easy level 40 reward data 150MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('23', '1', '40', 'SCORE', '300', 'POINT', '1', '0', 'Easy level 40 reward score 300 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('24', '1', '45', 'MONEY', '9', 'HTG', '1', '0', 'Easy level 45 reward data 180MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('26', '1', '45', 'SCORE', '380', 'POINT', '1', '0', 'Easy level 45 reward score 380 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('27', '1', '50', 'MONEY', '10', 'HTG', '1', '0', 'Easy level 50 reward data 250MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('29', '1', '50', 'SCORE', '500', 'POINT', '1', '0', 'Easy level 50 reward score 500 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('30', '2', '5', 'MONEY', '2', 'HTG', '1', '0', 'Normal level 5 reward data 20MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('32', '2', '5', 'SCORE', '70', 'POINT', '1', '0', 'Normal level 5 reward score 70 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('33', '2', '10', 'MONEY', '4', 'HTG', '1', '0', 'Normal level 10 reward data 40MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('35', '2', '10', 'SCORE', '130', 'POINT', '1', '0', 'Normal level 10 reward score 130 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('36', '2', '15', 'MONEY', '6', 'HTG', '1', '0', 'Normal level 15 reward data 80MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('38', '2', '15', 'SCORE', '190', 'POINT', '1', '0', 'Normal level 15 reward score 190 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('39', '2', '20', 'MONEY', '8', 'HTG', '1', '0', 'Normal level 20 reward data 140MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('40', '2', '20', 'SCORE', '260', 'POINT', '1', '0', 'Normal level 20 reward score 260 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('41', '2', '25', 'MONEY', '10', 'HTG', '1', '0', 'Normal level 25 reward data 180MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('43', '2', '25', 'SCORE', '320', 'POINT', '1', '0', 'Normal level 25 reward score 320 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('44', '2', '30', 'MONEY', '12', 'HTG', '1', '0', 'Normal level 30 reward data 220MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('46', '2', '30', 'SCORE', '380', 'POINT', '1', '0', 'Normal level 30 reward score 380 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('47', '2', '35', 'MONEY', '14', 'HTG', '1', '0', 'Normal level 35 reward data 260MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('49', '2', '35', 'SCORE', '450', 'POINT', '1', '0', 'Normal level 35 reward score 450 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('50', '2', '40', 'MONEY', '16', 'HTG', '1', '0', 'Normal level 40 reward data 300MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('52', '2', '40', 'SCORE', '520', 'POINT', '1', '0', 'Normal level 40 reward score 520 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('53', '2', '45', 'MONEY', '18', 'HTG', '1', '0', 'Normal level 45 reward data 350MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('55', '2', '45', 'SCORE', '600', 'POINT', '1', '0', 'Normal level 45 reward score 600 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('56', '2', '50', 'MONEY', '20', 'HTG', '1', '0', 'Normal level 50 reward data 450MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('58', '2', '50', 'SCORE', '700', 'POINT', '1', '0', 'Normal level 50 reward score 700 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('59', '3', '5', 'MONEY', '3', 'HTG', '1', '0', 'Hard level 5 reward data 40MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('61', '3', '5', 'SCORE', '100', 'POINT', '1', '0', 'Hard level 5 reward score 100 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('62', '3', '10', 'MONEY', '6', 'HTG', '1', '0', 'Hard level 10 reward data 80MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('64', '3', '10', 'SCORE', '200', 'POINT', '1', '0', 'Hard level 10 reward score 200 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('65', '3', '15', 'MONEY', '9', 'HTG', '1', '0', 'Hard level 15 reward data 140MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('67', '3', '15', 'SCORE', '300', 'POINT', '1', '0', 'Hard level 15 reward score 300 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('68', '3', '20', 'MONEY', '12', 'HTG', '1', '0', 'Hard level 20 reward data 220MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('69', '3', '20', 'SCORE', '400', 'POINT', '1', '0', 'Hard level 20 reward score 400 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('70', '3', '25', 'MONEY', '15', 'HTG', '1', '0', 'Hard level 25 reward data 300MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('72', '3', '25', 'SCORE', '500', 'POINT', '1', '0', 'Hard level 25 reward score 500 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('73', '3', '30', 'MONEY', '18', 'HTG', '1', '0', 'Hard level 30 reward data 380MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('75', '3', '30', 'SCORE', '600', 'POINT', '1', '0', 'Hard level 30 reward score 600 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('76', '3', '35', 'MONEY', '21', 'HTG', '1', '0', 'Hard level 35 reward data 450MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('78', '3', '35', 'SCORE', '700', 'POINT', '1', '0', 'Hard level 35 reward score 700 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('79', '3', '40', 'MONEY', '24', 'HTG', '1', '0', 'Hard level 40 reward data 520MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('81', '3', '40', 'SCORE', '800', 'POINT', '1', '0', 'Hard level 40 reward score 800 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('82', '3', '45', 'MONEY', '27', 'HTG', '1', '0', 'Hard level 45 reward data 600MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('84', '3', '45', 'SCORE', '900', 'POINT', '1', '0', 'Hard level 45 reward score 900 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('85', '3', '50', 'MONEY', '30', 'HTG', '1', '0', 'Hard level 50 reward data 750MB', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_LEVEL_REWARD_OPTION" VALUES ('87', '3', '50', 'SCORE', '1000', 'POINT', '1', '0', 'Hard level 50 reward score 1000 point', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_MODE
-- ----------------------------
DROP TABLE "GAME_MODE";
CREATE TABLE "GAME_MODE" (
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "MODE_CODE" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "MODE_NAME" NVARCHAR2(100) VISIBLE NOT NULL,
  "TIME_LIMIT_SECONDS" NUMBER(5,0) VISIBLE NOT NULL,
  "DISPLAY_ORDER" NUMBER(5,0) VISIBLE DEFAULT 0 NOT NULL,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MODE"."MODE_ID" IS 'Khoa chinh che do choi';
COMMENT ON COLUMN "GAME_MODE"."MODE_CODE" IS 'Ma che do choi: EASY, NORMAL, HARD';
COMMENT ON COLUMN "GAME_MODE"."MODE_NAME" IS 'Ten hien thi cua che do choi';
COMMENT ON COLUMN "GAME_MODE"."TIME_LIMIT_SECONDS" IS 'Thoi gian choi mac dinh moi level tinh bang giay';
COMMENT ON COLUMN "GAME_MODE"."DISPLAY_ORDER" IS 'Thu tu hien thi tren UI';
COMMENT ON COLUMN "GAME_MODE"."STATUS" IS 'Trang thai: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_MODE"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MODE"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MODE" IS 'Danh muc che do choi Kitty Fall';

-- ----------------------------
-- Records of GAME_MODE
-- ----------------------------
INSERT INTO "GAME_MODE" VALUES ('1', 'EASY', 'Easy', '150', '1', '1', TO_DATE('2026-07-06 14:02:08', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MODE" VALUES ('2', 'NORMAL', 'Normal', '100', '2', '1', TO_DATE('2026-07-06 14:02:08', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MODE" VALUES ('3', 'HARD', 'Hard', '60', '3', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_MONTHLY_DRAW
-- ----------------------------
DROP TABLE "GAME_MONTHLY_DRAW";
CREATE TABLE "GAME_MONTHLY_DRAW" (
  "DRAW_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MONTH_KEY" NUMBER(6,0) VISIBLE NOT NULL,
  "DRAW_TIME" DATE VISIBLE,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_ELIGIBLE" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_TICKET" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."DRAW_ID" IS 'Khoa chinh dot quay';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."MONTH_KEY" IS 'Thang duoc quay thuong dang YYYYMM';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."DRAW_TIME" IS 'Thoi diem thuc hien quay';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."STATUS" IS 'Trang thai draw: 0 NEW, 1 LOCKED, 2 DRAWING, 3 COMPLETED, 4 CANCELLED';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."TOTAL_ELIGIBLE" IS 'Tong so user du dieu kien quay';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."TOTAL_TICKET" IS 'Tong so ticket trong dot quay';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MONTHLY_DRAW" IS 'Dot quay thuong thang';

-- ----------------------------
-- Records of GAME_MONTHLY_DRAW
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
DROP TABLE "GAME_MONTHLY_DRAW_TICKET";
CREATE TABLE "GAME_MONTHLY_DRAW_TICKET" (
  "TICKET_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "DRAW_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MONTH_KEY" NUMBER(6,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "TICKET_NO" NUMBER(12,0) VISIBLE NOT NULL,
  "TOTAL_SCORE" NUMBER(12,0) VISIBLE NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."TICKET_ID" IS 'Khoa chinh ticket';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."DRAW_ID" IS 'Dot quay thuong chua ticket';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."MONTH_KEY" IS 'Thang cua ticket dang YYYYMM';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."MSISDN" IS 'So thue bao so huu ticket';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."TICKET_NO" IS 'So thu tu ticket trong dot quay';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."TOTAL_SCORE" IS 'Tong score thang tai thoi diem sinh ticket';
COMMENT ON COLUMN "GAME_MONTHLY_DRAW_TICKET"."CREATED_TIME" IS 'Thoi diem tao ticket';
COMMENT ON TABLE "GAME_MONTHLY_DRAW_TICKET" IS 'Ticket quay thuong thang cua user';

-- ----------------------------
-- Records of GAME_MONTHLY_DRAW_TICKET
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
DROP TABLE "GAME_MONTHLY_PRIZE_CONFIG";
CREATE TABLE "GAME_MONTHLY_PRIZE_CONFIG" (
  "PRIZE_CONFIG_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "PRIZE_CODE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "PRIZE_NAME" NVARCHAR2(200) VISIBLE NOT NULL,
  "PRIZE_VALUE" NUMBER(18,2) VISIBLE NOT NULL,
  "PRIZE_UNIT" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'MMK' NOT NULL,
  "QUANTITY" NUMBER(10,0) VISIBLE NOT NULL,
  "DISPLAY_ORDER" NUMBER(5,0) VISIBLE DEFAULT 0 NOT NULL,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."PRIZE_CONFIG_ID" IS 'Khoa chinh cau hinh giai';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."PRIZE_CODE" IS 'Ma giai: FIRST, SECOND, THIRD';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."PRIZE_NAME" IS 'Ten giai hien thi';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."PRIZE_VALUE" IS 'Gia tri giai thuong';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."PRIZE_UNIT" IS 'Don vi giai thuong, vi du MMK';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."QUANTITY" IS 'So luong nguoi trung giai nay moi thang';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."DISPLAY_ORDER" IS 'Thu tu xu ly/hien thi giai';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."STATUS" IS 'Trang thai cau hinh: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MONTHLY_PRIZE_CONFIG"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MONTHLY_PRIZE_CONFIG" IS 'Cau hinh giai thuong quay thang';

-- ----------------------------
-- Records of GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
INSERT INTO "GAME_MONTHLY_PRIZE_CONFIG" VALUES ('1', 'FIRST', 'First Prize', '2000000', 'HTG', '1', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_PRIZE_CONFIG" VALUES ('2', 'SECOND', 'Second Prize', '500000', 'HTG', '1', '2', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_PRIZE_CONFIG" VALUES ('3', 'THIRD', 'Third Prize', '200000', 'HTG', '2', '3', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_MONTHLY_RANKING
-- ----------------------------
DROP TABLE "GAME_MONTHLY_RANKING";
CREATE TABLE "GAME_MONTHLY_RANKING" (
  "RANKING_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MONTH_KEY" NUMBER(6,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "USER_ID" NUMBER(18,0) VISIBLE,
  "TOTAL_SCORE" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_PLAY" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "MAX_LEVEL_REACHED" NUMBER(3,0) VISIBLE DEFAULT 0 NOT NULL,
  "BEST_MODE_ID" NUMBER(10,0) VISIBLE,
  "RANK_NO" NUMBER(12,0) VISIBLE,
  "TICKET_COUNT" NUMBER(10,0) VISIBLE DEFAULT 0 NOT NULL,
  "IS_ELIGIBLE" NUMBER(1,0) VISIBLE DEFAULT 0 NOT NULL,
  "LAST_CALC_TIME" DATE VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."RANKING_ID" IS 'Khoa chinh ranking thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."MONTH_KEY" IS 'Thang ranking dang YYYYMM';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."MSISDN" IS 'So thue bao duoc xep hang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."USER_ID" IS 'ID user tu ACCOUNT_USER neu co';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."TOTAL_SCORE" IS 'Tong score trong thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."TOTAL_PLAY" IS 'Tong so session choi trong thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."MAX_LEVEL_REACHED" IS 'Level cao nhat dat duoc trong thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."BEST_MODE_ID" IS 'Mode tot nhat cua user trong thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."RANK_NO" IS 'Thu hang trong thang';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."TICKET_COUNT" IS 'So ticket quay thuong theo tong score';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."IS_ELIGIBLE" IS 'Du dieu kien quay thuong thang hay khong';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."LAST_CALC_TIME" IS 'Thoi diem tinh ranking gan nhat';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MONTHLY_RANKING"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MONTHLY_RANKING" IS 'Snapshot xep hang va dieu kien quay thuong theo thang';

-- ----------------------------
-- Records of GAME_MONTHLY_RANKING
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_MONTHLY_TICKET_RULE
-- ----------------------------
DROP TABLE "GAME_MONTHLY_TICKET_RULE";
CREATE TABLE "GAME_MONTHLY_TICKET_RULE" (
  "TICKET_RULE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "MIN_SCORE" NUMBER(12,0) VISIBLE NOT NULL,
  "MAX_SCORE" NUMBER(12,0) VISIBLE,
  "TICKET_COUNT" NUMBER(10,0) VISIBLE NOT NULL,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."TICKET_RULE_ID" IS 'Khoa chinh rule ticket';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."MIN_SCORE" IS 'Diem toi thieu de ap dung rule';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."MAX_SCORE" IS 'Diem toi da de ap dung rule, null la khong gioi han tren';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."TICKET_COUNT" IS 'So ticket duoc cap';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."STATUS" IS 'Trang thai rule: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MONTHLY_TICKET_RULE"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MONTHLY_TICKET_RULE" IS 'Cau hinh so ticket theo tong score thang';

-- ----------------------------
-- Records of GAME_MONTHLY_TICKET_RULE
-- ----------------------------
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('1', '5000', '5999', '1', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('2', '6000', '6999', '2', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('3', '7000', '7999', '3', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('4', '8000', '8999', '5', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('5', '9000', '9999', '7', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_MONTHLY_TICKET_RULE" VALUES ('6', '10000', NULL, '10', '1', TO_DATE('2026-07-06 14:02:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_MONTHLY_WINNER
-- ----------------------------
DROP TABLE "GAME_MONTHLY_WINNER";
CREATE TABLE "GAME_MONTHLY_WINNER" (
  "WINNER_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "DRAW_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MONTH_KEY" NUMBER(6,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "TICKET_ID" NUMBER(18,0) VISIBLE,
  "PRIZE_CODE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "PRIZE_NAME" NVARCHAR2(200) VISIBLE NOT NULL,
  "PRIZE_VALUE" NUMBER(18,2) VISIBLE NOT NULL,
  "PRIZE_UNIT" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'MMK' NOT NULL,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 0 NOT NULL,
  "ANNOUNCE_TIME" DATE VISIBLE,
  "PAID_TIME" DATE VISIBLE,
  "RESPONSE_CODE" VARCHAR2(50 BYTE) VISIBLE,
  "RESPONSE_MESSAGE" VARCHAR2(500 BYTE) VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."WINNER_ID" IS 'Khoa chinh winner';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."DRAW_ID" IS 'Dot quay sinh winner';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."MONTH_KEY" IS 'Thang trung thuong dang YYYYMM';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."MSISDN" IS 'So thue bao trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."TICKET_ID" IS 'Ticket trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."PRIZE_CODE" IS 'Ma giai trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."PRIZE_NAME" IS 'Ten giai trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."PRIZE_VALUE" IS 'Gia tri giai trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."PRIZE_UNIT" IS 'Don vi giai trung thuong';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."STATUS" IS 'Trang thai winner: 0 NEW, 1 ANNOUNCED, 2 PAID, 3 FAILED, 4 CANCELLED';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."ANNOUNCE_TIME" IS 'Thoi diem cong bo winner';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."PAID_TIME" IS 'Thoi diem tra giai';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."RESPONSE_CODE" IS 'Ma ket qua tra giai';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."RESPONSE_MESSAGE" IS 'Mo ta ket qua tra giai';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_MONTHLY_WINNER"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_MONTHLY_WINNER" IS 'Danh sach user trung thuong thang';

-- ----------------------------
-- Records of GAME_MONTHLY_WINNER
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_PLAY_SESSION
-- ----------------------------
DROP TABLE "GAME_PLAY_SESSION";
CREATE TABLE "GAME_PLAY_SESSION" (
  "SESSION_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ROOT_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "USER_ID" NUMBER(18,0) VISIBLE,
  "REGISTER_ID" NUMBER(18,0) VISIBLE,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "START_LEVEL" NUMBER(3,0) VISIBLE DEFAULT 1 NOT NULL,
  "CURRENT_LEVEL" NUMBER(3,0) VISIBLE DEFAULT 1 NOT NULL,
  "MAX_LEVEL_REACHED" NUMBER(3,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_SCORE" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_REWARD_SCORE" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_DATA_MB" NUMBER(12,2) VISIBLE DEFAULT 0 NOT NULL,
  "TOTAL_LOYALTY" NUMBER(12,2) VISIBLE DEFAULT 0 NOT NULL,
  "TURN_DEDUCTED" NUMBER(1,0) VISIBLE DEFAULT 0 NOT NULL,
  "TURN_SOURCE" VARCHAR2(30 BYTE) VISIBLE,
  "TURN_REF_ID" VARCHAR2(100 BYTE) VISIBLE,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 1 NOT NULL,
  "START_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "END_TIME" DATE VISIBLE,
  "LAST_ACTION_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "CHANNEL" VARCHAR2(20 BYTE) VISIBLE,
  "CLIENT_IP" VARCHAR2(100 BYTE) VISIBLE,
  "USER_AGENT" VARCHAR2(500 BYTE) VISIBLE,
  "FAIL_REASON" VARCHAR2(200 BYTE) VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_PLAY_SESSION"."SESSION_ID" IS 'Khoa chinh session choi';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."ROOT_TRANS_ID" IS 'Ma giao dich goc cua mot lan choi, dung chung cho cac level trong session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."MSISDN" IS 'So thue bao choi game';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."USER_ID" IS 'ID user tu bang ACCOUNT_USER neu co';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."REGISTER_ID" IS 'ID dang ky goi tu bang REG_INFO neu co';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."MODE_ID" IS 'Che do choi cua session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."START_LEVEL" IS 'Level bat dau cua session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."CURRENT_LEVEL" IS 'Level hien tai dang choi';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."MAX_LEVEL_REACHED" IS 'Level cao nhat da qua trong session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TOTAL_SCORE" IS 'Tong diem thuc te cua session gom base score va score reward';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TOTAL_REWARD_SCORE" IS 'Tong diem nhan tu reward type SCORE trong session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TOTAL_DATA_MB" IS 'Tong dung luong data MB da trung trong session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TOTAL_LOYALTY" IS 'Tong loyalty point da trung trong session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TURN_DEDUCTED" IS 'Da tru turn hay chua: 1 da tru, 0 chua tru';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TURN_SOURCE" IS 'Nguon turn: SUB, BUY, FREE, GIFT, ADMIN';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."TURN_REF_ID" IS 'Ma tham chieu giao dich/ban ghi tru turn';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."STATUS" IS 'Trang thai session: 0 INIT, 1 PLAYING, 2 COMPLETED, 3 FAILED, 4 TIMEOUT, 5 CANCELLED, 6 EXPIRED';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."START_TIME" IS 'Thoi diem bat dau session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."END_TIME" IS 'Thoi diem ket thuc session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."LAST_ACTION_TIME" IS 'Thoi diem thao tac gan nhat cua session';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."CHANNEL" IS 'Kenh phat sinh session: WEB, APP, USSD, SMS, SYSTEM';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."CLIENT_IP" IS 'IP client khi bat dau choi';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."USER_AGENT" IS 'Thong tin trinh duyet/thiet bi client';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."FAIL_REASON" IS 'Ly do fail/cancel/timeout neu co';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_PLAY_SESSION"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_PLAY_SESSION" IS 'Mot lan bam Play va tieu hao turn cua user';

-- ----------------------------
-- Records of GAME_PLAY_SESSION
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_RESCUE_LOG
-- ----------------------------
DROP TABLE "GAME_RESCUE_LOG";
CREATE TABLE "GAME_RESCUE_LOG" (
  "RESCUE_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "SESSION_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ROOT_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "CHILD_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "LEVEL_NO" NUMBER(3,0) VISIBLE NOT NULL,
  "FEE" NUMBER(12,2) VISIBLE DEFAULT 79 NOT NULL,
  "CHARGE_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE,
  "CHARGE_STATUS" NUMBER(2,0) VISIBLE,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 0 NOT NULL,
  "REQUEST_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "RESPONSE_TIME" DATE VISIBLE,
  "RESPONSE_CODE" VARCHAR2(50 BYTE) VISIBLE,
  "RESPONSE_MESSAGE" VARCHAR2(500 BYTE) VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_RESCUE_LOG"."RESCUE_ID" IS 'Khoa chinh rescue log';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."SESSION_ID" IS 'Session su dung rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."ROOT_TRANS_ID" IS 'Ma giao dich goc cua session';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."CHILD_TRANS_ID" IS 'Child trans cua level dang rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."MSISDN" IS 'So thue bao mua rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."MODE_ID" IS 'Che do choi khi mua rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."LEVEL_NO" IS 'Level su dung rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."FEE" IS 'Phi rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."CHARGE_TRANS_ID" IS 'Ma giao dich charge phi rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."CHARGE_STATUS" IS 'Trang thai charge tu he thong thanh toan';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."STATUS" IS 'Trang thai rescue: 0 NEW, 1 CHARGING, 2 SUCCESS, 3 FAILED, 4 CANCELLED';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."REQUEST_TIME" IS 'Thoi diem gui yeu cau rescue';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."RESPONSE_TIME" IS 'Thoi diem nhan ket qua rescue/charge';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."RESPONSE_CODE" IS 'Ma ket qua tu he thong charge';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."RESPONSE_MESSAGE" IS 'Mo ta ket qua tu he thong charge';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_RESCUE_LOG"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_RESCUE_LOG" IS 'Lich su mua/su dung rescue, toi da 1 lan moi session';

-- ----------------------------
-- Records of GAME_RESCUE_LOG
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
DROP TABLE "GAME_REWARD_LIMIT_CONFIG";
CREATE TABLE "GAME_REWARD_LIMIT_CONFIG" (
  "LIMIT_CONFIG_ID" NUMBER(12,0) VISIBLE NOT NULL,
  "LIMIT_CODE" VARCHAR2(50 BYTE) VISIBLE NOT NULL,
  "LIMIT_NAME" NVARCHAR2(200) VISIBLE NOT NULL,
  "PERIOD_TYPE" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'DAILY' NOT NULL,
  "REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE,
  "LEVEL_NO" NUMBER(3,0) VISIBLE,
  "MAX_TOTAL_VALUE" NUMBER(18,2) VISIBLE,
  "MAX_TOTAL_COUNT" NUMBER(12,0) VISIBLE,
  "PRIORITY" NUMBER(5,0) VISIBLE DEFAULT 0 NOT NULL,
  "EFFECTIVE_FROM" DATE VISIBLE,
  "EFFECTIVE_TO" DATE VISIBLE,
  "EXCEED_ACTION" VARCHAR2(30 BYTE) VISIBLE DEFAULT 'BLOCK' NOT NULL,
  "FALLBACK_REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE,
  "FALLBACK_REWARD_VALUE" NUMBER(12,2) VISIBLE,
  "FALLBACK_REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE,
  "STATUS" NUMBER(1,0) VISIBLE DEFAULT 1 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."LIMIT_CONFIG_ID" IS 'Khoa chinh cau hinh han muc reward';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."LIMIT_CODE" IS 'Ma cau hinh han muc, dung de nhan dien duy nhat';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."LIMIT_NAME" IS 'Ten mo ta cau hinh han muc';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."PERIOD_TYPE" IS 'Ky ap dung han muc: DAILY theo ngay, MONTHLY theo thang';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."REWARD_TYPE" IS 'Loai reward bi gioi han: DATA, LOYALTY, SCORE, MONEY';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."REWARD_UNIT" IS 'Don vi reward bi gioi han: MB, POINT, MMK';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."MODE_ID" IS 'Mode ap dung han muc, null la ap dung tat ca mode';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."LEVEL_NO" IS 'Level ap dung han muc, null la ap dung tat ca level';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."MAX_TOTAL_VALUE" IS 'Tong gia tri reward toi da duoc tra trong ky';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."MAX_TOTAL_COUNT" IS 'Tong so lan reward toi da duoc tra trong ky';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."PRIORITY" IS 'Do uu tien khi co nhieu cau hinh match, so lon uu tien hon';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."EFFECTIVE_FROM" IS 'Ngay bat dau hieu luc cau hinh';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."EFFECTIVE_TO" IS 'Ngay ket thuc hieu luc cau hinh';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."EXCEED_ACTION" IS 'Hanh dong khi vuot han muc: BLOCK chan, FALLBACK doi thuong, QUEUE dua vao cho xu ly sau';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."FALLBACK_REWARD_TYPE" IS 'Loai reward thay the neu EXCEED_ACTION la FALLBACK';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."FALLBACK_REWARD_VALUE" IS 'Gia tri reward thay the neu EXCEED_ACTION la FALLBACK';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."FALLBACK_REWARD_UNIT" IS 'Don vi reward thay the neu EXCEED_ACTION la FALLBACK';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."STATUS" IS 'Trang thai cau hinh: 1 hieu luc, 0 khong hieu luc';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_CONFIG"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_REWARD_LIMIT_CONFIG" IS 'Cau hinh han muc tra thuong de kiem soat chi phi theo ngay/thang';

-- ----------------------------
-- Records of GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
INSERT INTO "GAME_REWARD_LIMIT_CONFIG" VALUES ('1', 'DAILY_DATA_MB_ALL', 'Daily data MB limit all game', 'DAILY', 'DATA', 'MB', NULL, NULL, '1000', NULL, '10', NULL, NULL, 'BLOCK', NULL, NULL, NULL, '1', TO_DATE('2026-07-06 14:02:41', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_REWARD_LIMIT_CONFIG" VALUES ('2', 'DAILY_MONEY_MMK_ALL', 'Daily money MMK limit all game', 'DAILY', 'MONEY', 'MMK', NULL, NULL, '5000', NULL, '10', NULL, NULL, 'BLOCK', NULL, NULL, NULL, '1', TO_DATE('2026-07-06 14:02:56', 'SYYYY-MM-DD HH24:MI:SS'), NULL);
INSERT INTO "GAME_REWARD_LIMIT_CONFIG" VALUES ('3', 'DAILY_MONEY_COUNT_ALL', 'Daily money reward count limit', 'DAILY', 'MONEY', 'MMK', NULL, NULL, NULL, '100', '5', NULL, NULL, 'BLOCK', NULL, NULL, NULL, '1', TO_DATE('2026-07-06 14:03:09', 'SYYYY-MM-DD HH24:MI:SS'), NULL);

-- ----------------------------
-- Table structure for GAME_REWARD_LIMIT_USAGE
-- ----------------------------
DROP TABLE "GAME_REWARD_LIMIT_USAGE";
CREATE TABLE "GAME_REWARD_LIMIT_USAGE" (
  "LIMIT_USAGE_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "LIMIT_CONFIG_ID" NUMBER(12,0) VISIBLE NOT NULL,
  "PERIOD_TYPE" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "PERIOD_KEY" NUMBER(8,0) VISIBLE NOT NULL,
  "REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "USED_TOTAL_VALUE" NUMBER(18,2) VISIBLE DEFAULT 0 NOT NULL,
  "USED_TOTAL_COUNT" NUMBER(12,0) VISIBLE DEFAULT 0 NOT NULL,
  "LAST_REWARD_LOG_ID" NUMBER(18,0) VISIBLE,
  "LAST_UPDATE_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."LIMIT_USAGE_ID" IS 'Khoa chinh usage han muc reward';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."LIMIT_CONFIG_ID" IS 'Cau hinh han muc dang duoc theo doi';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."PERIOD_TYPE" IS 'Ky usage: DAILY hoac MONTHLY';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."PERIOD_KEY" IS 'Khoa ky: DAILY dung YYYYMMDD, MONTHLY dung YYYYMM';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."REWARD_TYPE" IS 'Loai reward cua usage: DATA, LOYALTY, SCORE, MONEY';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."REWARD_UNIT" IS 'Don vi reward cua usage';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."USED_TOTAL_VALUE" IS 'Tong gia tri reward da tra trong ky';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."USED_TOTAL_COUNT" IS 'Tong so lan reward da tra trong ky';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."LAST_REWARD_LOG_ID" IS 'Reward log gan nhat lam thay doi usage';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."LAST_UPDATE_TIME" IS 'Thoi diem cap nhat usage gan nhat';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_REWARD_LIMIT_USAGE"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_REWARD_LIMIT_USAGE" IS 'So lieu da su dung cua han muc reward theo tung ky';

-- ----------------------------
-- Records of GAME_REWARD_LIMIT_USAGE
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_REWARD_LOG
-- ----------------------------
DROP TABLE "GAME_REWARD_LOG";
CREATE TABLE "GAME_REWARD_LOG" (
  "REWARD_LOG_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "USER_ID" NUMBER(18,0) VISIBLE,
  "SESSION_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ATTEMPT_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ROOT_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "CHILD_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "MODE_ID" NUMBER(10,0) VISIBLE NOT NULL,
  "LEVEL_NO" NUMBER(3,0) VISIBLE NOT NULL,
  "REWARD_OPTION_ID" NUMBER(12,0) VISIBLE,
  "REWARD_TYPE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "REWARD_VALUE" NUMBER(12,2) VISIBLE NOT NULL,
  "REWARD_UNIT" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "LIMIT_CONFIG_ID" NUMBER(12,0) VISIBLE,
  "STATUS" NUMBER(2,0) VISIBLE DEFAULT 0 NOT NULL,
  "EXTERNAL_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE,
  "REQUEST_TIME" DATE VISIBLE,
  "RESPONSE_TIME" DATE VISIBLE,
  "RESPONSE_CODE" VARCHAR2(50 BYTE) VISIBLE,
  "RESPONSE_MESSAGE" VARCHAR2(500 BYTE) VISIBLE,
  "RETRY_COUNT" NUMBER(5,0) VISIBLE DEFAULT 0 NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "UPDATED_TIME" DATE VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_REWARD_LOG"."REWARD_LOG_ID" IS 'Khoa chinh reward log';
COMMENT ON COLUMN "GAME_REWARD_LOG"."MSISDN" IS 'So thue bao nhan reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."USER_ID" IS 'ID user tu ACCOUNT_USER neu co';
COMMENT ON COLUMN "GAME_REWARD_LOG"."SESSION_ID" IS 'Session phat sinh reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."ATTEMPT_ID" IS 'Level attempt phat sinh reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."ROOT_TRANS_ID" IS 'Ma giao dich goc cua session';
COMMENT ON COLUMN "GAME_REWARD_LOG"."CHILD_TRANS_ID" IS 'Ma giao dich con cua level';
COMMENT ON COLUMN "GAME_REWARD_LOG"."MODE_ID" IS 'Che do choi phat sinh reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."LEVEL_NO" IS 'Level moc phat sinh reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."REWARD_OPTION_ID" IS 'Option reward da duoc chon';
COMMENT ON COLUMN "GAME_REWARD_LOG"."REWARD_TYPE" IS 'Loai reward thuc te: DATA, LOYALTY, SCORE, MONEY';
COMMENT ON COLUMN "GAME_REWARD_LOG"."REWARD_VALUE" IS 'Gia tri reward thuc te';
COMMENT ON COLUMN "GAME_REWARD_LOG"."REWARD_UNIT" IS 'Don vi reward thuc te';
COMMENT ON COLUMN "GAME_REWARD_LOG"."LIMIT_CONFIG_ID" IS 'Han muc reward da duoc ap dung khi tra thuong, null neu khong ap dung han muc';
COMMENT ON COLUMN "GAME_REWARD_LOG"."STATUS" IS 'Trang thai reward: 0 NEW, 1 PROCESSING, 2 SUCCESS, 3 FAILED, 4 CANCELLED';
COMMENT ON COLUMN "GAME_REWARD_LOG"."EXTERNAL_TRANS_ID" IS 'Ma giao dich he thong ngoai khi tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."REQUEST_TIME" IS 'Thoi diem bat dau goi tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."RESPONSE_TIME" IS 'Thoi diem nhan ket qua tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."RESPONSE_CODE" IS 'Ma ket qua tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."RESPONSE_MESSAGE" IS 'Noi dung ket qua tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."RETRY_COUNT" IS 'So lan retry tra reward';
COMMENT ON COLUMN "GAME_REWARD_LOG"."CREATED_TIME" IS 'Thoi diem tao ban ghi';
COMMENT ON COLUMN "GAME_REWARD_LOG"."UPDATED_TIME" IS 'Thoi diem cap nhat gan nhat';
COMMENT ON TABLE "GAME_REWARD_LOG" IS 'Lich su reward thuc te user nhan tai level moc';

-- ----------------------------
-- Records of GAME_REWARD_LOG
-- ----------------------------

-- ----------------------------
-- Table structure for GAME_SCORE_LEDGER
-- ----------------------------
DROP TABLE "GAME_SCORE_LEDGER";
CREATE TABLE "GAME_SCORE_LEDGER" (
  "LEDGER_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "USER_ID" NUMBER(18,0) VISIBLE,
  "SESSION_ID" NUMBER(18,0) VISIBLE NOT NULL,
  "ATTEMPT_ID" NUMBER(18,0) VISIBLE,
  "ROOT_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE NOT NULL,
  "CHILD_TRANS_ID" VARCHAR2(100 BYTE) VISIBLE,
  "SCORE_TYPE" VARCHAR2(30 BYTE) VISIBLE NOT NULL,
  "SCORE_DELTA" NUMBER(12,0) VISIBLE NOT NULL,
  "BALANCE_AFTER" NUMBER(12,0) VISIBLE,
  "DESCRIPTION" NVARCHAR2(500) VISIBLE,
  "CREATED_TIME" DATE VISIBLE DEFAULT SYSDATE NOT NULL,
  "CREATED_DATE_KEY" NUMBER(8,0) VISIBLE NOT NULL,
  "CREATED_MONTH_KEY" NUMBER(6,0) VISIBLE NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."LEDGER_ID" IS 'Khoa chinh dong ledger diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."MSISDN" IS 'So thue bao duoc cong/tru diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."USER_ID" IS 'ID user tu ACCOUNT_USER neu co';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."SESSION_ID" IS 'Session phat sinh diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."ATTEMPT_ID" IS 'Level attempt phat sinh diem neu co';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."ROOT_TRANS_ID" IS 'Ma giao dich goc cua session';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."CHILD_TRANS_ID" IS 'Ma giao dich con cua level phat sinh diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."SCORE_TYPE" IS 'Loai diem: LEVEL, REWARD, ADJUST, CANCEL';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."SCORE_DELTA" IS 'So diem thay doi, duong la cong diem, am la tru diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."BALANCE_AFTER" IS 'Tong diem sau khi xu ly neu he thong co tinh balance';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."DESCRIPTION" IS 'Mo ta ly do cong/tru diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."CREATED_TIME" IS 'Thoi diem phat sinh diem';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."CREATED_DATE_KEY" IS 'Ngay phat sinh dang YYYYMMDD de query nhanh';
COMMENT ON COLUMN "GAME_SCORE_LEDGER"."CREATED_MONTH_KEY" IS 'Thang phat sinh dang YYYYMM de tinh ranking thang';
COMMENT ON TABLE "GAME_SCORE_LEDGER" IS 'So cai diem game, dung de audit va tinh ranking';

-- ----------------------------
-- Records of GAME_SCORE_LEDGER
-- ----------------------------

-- ----------------------------
-- Table structure for LUCKY_SPIN
-- ----------------------------
DROP TABLE "LUCKY_SPIN";
CREATE TABLE "LUCKY_SPIN" (
  "ID" NUMBER(12,0) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(15 BYTE) VISIBLE,
  "ADDED" NUMBER(10,0) VISIBLE,
  "USED" NUMBER(10,0) VISIBLE,
  "INSERT_TIME" DATE VISIBLE,
  "EXPIRE_TIME" DATE VISIBLE,
  "LAST_UPDATE" DATE VISIBLE,
  "CHANNEL_ADD" VARCHAR2(15 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of LUCKY_SPIN
-- ----------------------------
INSERT INTO "LUCKY_SPIN" VALUES ('1', '95123456789', '217', '5', TO_DATE('2026-07-08 11:50:21', 'SYYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2026-07-09 11:37:49', 'SYYYY-MM-DD HH24:MI:SS'), 'WEB');

-- ----------------------------
-- Table structure for MPS_CONFIG
-- ----------------------------
DROP TABLE "MPS_CONFIG";
CREATE TABLE "MPS_CONFIG" (
  "ACTION_CODE" VARCHAR2(200 BYTE) VISIBLE,
  "SERVICE" VARCHAR2(100 BYTE) VISIBLE,
  "SUB_SERVICE" VARCHAR2(100 BYTE) VISIBLE,
  "CP_NAME" VARCHAR2(100 BYTE) VISIBLE,
  "COMMAND" VARCHAR2(100 BYTE) VISIBLE,
  "CATEGORY" VARCHAR2(100 BYTE) VISIBLE,
  "PRICE" VARCHAR2(100 BYTE) VISIBLE,
  "KEY_PATH" VARCHAR2(200 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of MPS_CONFIG
-- ----------------------------
INSERT INTO "MPS_CONFIG" VALUES ('CHARGE_10', 'MINHA_VIBE', 'MINHA_VIBE_MINUS', 'VIETTECH', 'CHARGE', 'MINUS10', '10', '../etc/key/MINHA_VIBE_MINUS/');
INSERT INTO "MPS_CONFIG" VALUES ('CHARGE_50', 'MINHA_VIBE', 'MINHA_VIBE_MINUS', 'VIETTECH', 'CHARGE', 'MINUS50', '50', '../etc/key/MINHA_VIBE_MINUS/');
INSERT INTO "MPS_CONFIG" VALUES ('CANEL_MINHA_VIBE_DAY', 'MINHA_VIBE', 'MINHA_VIBE_DAY', 'VIETTECH', 'CANEL', 'BLANK', '0', '../etc/key/MINHA_VIBE_DAY/');
INSERT INTO "MPS_CONFIG" VALUES ('REGISTER_MINHA_VIBE_MR_DAY', 'MINHA_VIBE', 'MINHA_VIBE_MR_DAY', 'VIETTECH', 'REGISTER', 'BLANK', '3', '../etc/key/MINHA_VIBE_MR_DAY/');
INSERT INTO "MPS_CONFIG" VALUES ('CHARGE_2', 'MINHA_VIBE', 'MINHA_VIBE_MINUS', 'VIETTECH', 'CHARGE', 'MINUS2', '2', '../etc/key/MINHA_VIBE_MINUS/');
INSERT INTO "MPS_CONFIG" VALUES ('REGISTER_MINHA_VIBE_DAY', 'MINHA_VIBE', 'MINHA_VIBE_DAY', 'VIETTECH', 'REGISTER', 'BLANK', '3', '../etc/key/MINHA_VIBE_DAY/');
INSERT INTO "MPS_CONFIG" VALUES ('ADD_5', 'MINHA_VIBE', 'VOZ_DA_SORTE_WIN', 'VIETTECH', 'MODBALANCEM', 'ADD5', '5', '../etc/key/VOZ_DA_SORTE_WIN/');
INSERT INTO "MPS_CONFIG" VALUES ('ADD_10', 'MINHA_VIBE', 'VOZ_DA_SORTE_WIN', 'VIETTECH', 'MODBALANCEM', 'ADD10', '10', '../etc/key/VOZ_DA_SORTE_WIN/');
INSERT INTO "MPS_CONFIG" VALUES ('ADD_20', 'MINHA_VIBE', 'VOZ_DA_SORTE_WIN', 'VIETTECH', 'MODBALANCEM', 'ADD20', '20', '../etc/key/VOZ_DA_SORTE_WIN/');
INSERT INTO "MPS_CONFIG" VALUES ('ADD_15', 'MINHA_VIBE', 'VOZ_DA_SORTE_WIN', 'VIETTECH', 'MODBALANCEM', 'ADD15', '15', '../etc/key/VOZ_DA_SORTE_WIN/');
INSERT INTO "MPS_CONFIG" VALUES ('CHARGE_1', 'MINHA_VIBE', 'MINHA_VIBE_MINUS', 'VIETTECH', 'CHARGE', 'MINUS1', '1', '../etc/key/MINHA_VIBE_MINUS/');

-- ----------------------------
-- Table structure for MT
-- ----------------------------
DROP TABLE "MT";
CREATE TABLE "MT" (
  "MT_ID" NUMBER VISIBLE NOT NULL,
  "MO_HIS_ID" NUMBER(10,0) VISIBLE,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE,
  "MESSAGE" NVARCHAR2(2000) VISIBLE,
  "RECEIVE_TIME" DATE VISIBLE,
  "RETRY_NUM" NUMBER(2,0) VISIBLE DEFAULT 0,
  "CHANNEL" VARCHAR2(10 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of MT
-- ----------------------------

-- ----------------------------
-- Table structure for MT_HIS
-- ----------------------------
DROP TABLE "MT_HIS";
CREATE TABLE "MT_HIS" (
  "MT_HIS_ID" NUMBER(10,0) VISIBLE,
  "MO_HIS_ID" NUMBER(10,0) VISIBLE,
  "MSISDN" VARCHAR2(15 BYTE) VISIBLE,
  "RECEIVE_TIME" DATE VISIBLE,
  "SENT_TIME" DATE VISIBLE,
  "MESSAGE" NVARCHAR2(1024) VISIBLE,
  "STATUS" NUMBER(1,0) VISIBLE,
  "CHANNEL" VARCHAR2(20 BYTE) VISIBLE,
  "NODE_NAME" NVARCHAR2(80) VISIBLE,
  "CLUSTER_NAME" NVARCHAR2(80) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of MT_HIS
-- ----------------------------

-- ----------------------------
-- Table structure for PACKG
-- ----------------------------
DROP TABLE "PACKG";
CREATE TABLE "PACKG" (
  "PRODUCT_ID" NUMBER(10,0) VISIBLE,
  "FEE" NUMBER(12,2) VISIBLE,
  "NUMBER_SPIN" NUMBER(5,0) VISIBLE,
  "PRODUCT_NAME" VARCHAR2(100 BYTE) VISIBLE,
  "SMS_SYNTAX" VARCHAR2(100 BYTE) VISIBLE,
  "BIZ_ID" NUMBER(5,0) VISIBLE,
  "EXPIRE_DAYS" NUMBER(5,0) VISIBLE,
  "RENEW" NUMBER(2,0) VISIBLE DEFAULT 0
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of PACKG
-- ----------------------------
INSERT INTO "PACKG" VALUES ('1', '177', '5', 'Kitty_Fall_DAYLY', NULL, '1', '1', '1');
INSERT INTO "PACKG" VALUES ('4', '89', '1', 'CHARGE89', NULL, NULL, '1', '0');
INSERT INTO "PACKG" VALUES ('6', '189', '5', 'CHARGE189', NULL, NULL, '1', '0');
INSERT INTO "PACKG" VALUES ('18', '0', '0', 'ADD5', NULL, NULL, '1', '0');
INSERT INTO "PACKG" VALUES ('19', '0', '0', 'ADD10', NULL, NULL, '1', '0');
INSERT INTO "PACKG" VALUES ('20', '0', '0', 'ADD15', NULL, NULL, '1', '0');
INSERT INTO "PACKG" VALUES ('21', '0', '0', 'ADD20', NULL, NULL, '1', '0');

-- ----------------------------
-- Table structure for PERMISSION
-- ----------------------------
DROP TABLE "PERMISSION";
CREATE TABLE "PERMISSION" (
  "ID" NUMBER VISIBLE,
  "NAME" VARCHAR2(200 BYTE) VISIBLE,
  "STATUS" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'ACTIVE',
  "PATH" VARCHAR2(200 BYTE) VISIBLE,
  "ACTION" VARCHAR2(200 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of PERMISSION
-- ----------------------------
INSERT INTO "PERMISSION" VALUES ('2029', 'SubscriptionChargeReport', 'ACTIVE', '/SubscriptionChargeReport', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('2030', 'subscriptionchargereport index', 'ACTIVE', '/subscriptionchargereport/index', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('2031', 'subscriptionchargereport', 'ACTIVE', '/admin/subscriptionchargereport', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1', 'Get User Register', 'ACTIVE', '/portal/user-register', '/');
INSERT INTO "PERMISSION" VALUES ('1005', 'Revenue Reports', 'ACTIVE', '/RevenueReport', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1006', 'Revenue Reports', 'ACTIVE', '/RevenueReport/Index', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1007', 'Revenue Reports', 'ACTIVE', '/Admin/RevenueReport', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1008', 'Users', 'ACTIVE', '/CmsAccount/Users', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1009', 'Save user', 'ACTIVE', '/cmsaccount/saveuser', 'EDIT');
INSERT INTO "PERMISSION" VALUES ('1010', 'Delete user', 'ACTIVE', '/cmsaccount/deleteuser', 'DELETE');
INSERT INTO "PERMISSION" VALUES ('1011', 'Roles', 'ACTIVE', '/CmsAccount/Roles', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1012', 'Save role', 'ACTIVE', '/cmsaccount/saverole', 'EDIT');
INSERT INTO "PERMISSION" VALUES ('1013', 'Delete role', 'ACTIVE', '/cmsaccount/deleterole', 'DELETE');
INSERT INTO "PERMISSION" VALUES ('1014', 'Role details', 'ACTIVE', '/cmsaccount/roledetails', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1015', 'Save role permissions', 'ACTIVE', '/cmsaccount/saverolepermissions', 'EDIT');
INSERT INTO "PERMISSION" VALUES ('1016', 'Permissions', 'ACTIVE', '/CmsAccount/Permissions', 'VIEW');
INSERT INTO "PERMISSION" VALUES ('1017', 'Save permission', 'ACTIVE', '/cmsaccount/savepermission', 'EDIT');
INSERT INTO "PERMISSION" VALUES ('1018', 'Delete permission', 'ACTIVE', '/cmsaccount/deletepermission', 'DELETE');

-- ----------------------------
-- Table structure for REG_INFO
-- ----------------------------
DROP TABLE "REG_INFO";
CREATE TABLE "REG_INFO" (
  "REGISTER_ID" NUMBER VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE,
  "PRODUCT_NAME" VARCHAR2(100 BYTE) VISIBLE,
  "REGISTER_TIME" DATE VISIBLE,
  "NUMBER_SPIN" NUMBER(5,0) VISIBLE,
  "EXTEND_SPIN" NUMBER(5,0) VISIBLE,
  "EXTEND_STATUS" NUMBER(1,0) VISIBLE,
  "STATUS" NUMBER(1,0) VISIBLE,
  "EXPIRE_TIME" DATE VISIBLE,
  "LAST_EXTEND" DATE VISIBLE,
  "PLAYED_TIMES" NUMBER(5,0) VISIBLE,
  "END_TIME" DATE VISIBLE,
  "ALREADY_CHARGED" NUMBER(10,2) VISIBLE,
  "RENEW" NUMBER(2,0) VISIBLE DEFAULT 0,
  "SERVICE_ID" NUMBER(10,2) VISIBLE,
  "CHANNEL" VARCHAR2(20 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of REG_INFO
-- ----------------------------
INSERT INTO "REG_INFO" VALUES ('1181', '95123456789', 'CHARGE89', TO_DATE('2026-07-08 16:57:31', 'SYYYY-MM-DD HH24:MI:SS'), '1', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '4', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1182', '95123456789', 'CHARGE189', TO_DATE('2026-07-08 16:59:18', 'SYYYY-MM-DD HH24:MI:SS'), '5', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '6', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1183', '95123456789', 'CHARGE189', TO_DATE('2026-07-08 17:00:17', 'SYYYY-MM-DD HH24:MI:SS'), '5', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '6', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1184', '95123456789', 'CHARGE89', TO_DATE('2026-07-08 17:00:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '4', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1185', '95123456789', 'CHARGE89', TO_DATE('2026-07-08 17:00:35', 'SYYYY-MM-DD HH24:MI:SS'), '1', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '4', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1186', '95123456789', 'CHARGE89', TO_DATE('2026-07-08 17:01:14', 'SYYYY-MM-DD HH24:MI:SS'), '1', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '4', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1200', '95123456789', 'CHARGE189', TO_DATE('2026-07-09 10:09:29', 'SYYYY-MM-DD HH24:MI:SS'), '5', NULL, '0', '1', TO_DATE('2026-07-09 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '0', '6', 'WEB');
INSERT INTO "REG_INFO" VALUES ('1180', '95123456789', 'Kitty_Fall_DAYLY', TO_DATE('2026-07-08 13:41:40', 'SYYYY-MM-DD HH24:MI:SS'), '5', NULL, '0', '1', TO_DATE('2026-07-08 23:59:59', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '0', NULL, NULL, '1', '1', 'WEB');

-- ----------------------------
-- Table structure for RESULT_REQUEST_INBOX
-- ----------------------------
DROP TABLE "RESULT_REQUEST_INBOX";
CREATE TABLE "RESULT_REQUEST_INBOX" (
  "EVENT_ID" VARCHAR2(64 CHAR) VISIBLE NOT NULL,
  "TRANSACTION_ID" VARCHAR2(128 CHAR) VISIBLE,
  "SERVICE_ID" VARCHAR2(100 CHAR) VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(32 CHAR) VISIBLE NOT NULL,
  "REQUEST_TIME" TIMESTAMP(6) VISIBLE NOT NULL,
  "CHARGE_TIME_RAW" VARCHAR2(64 CHAR) VISIBLE,
  "PARAMS_VALUE" VARCHAR2(32 CHAR) VISIBLE,
  "MODE_VALUE" VARCHAR2(32 CHAR) VISIBLE,
  "AMOUNT_VALUE" VARCHAR2(64 CHAR) VISIBLE,
  "COMMAND_VALUE" VARCHAR2(100 CHAR) VISIBLE,
  "PAYLOAD_HASH" VARCHAR2(64 CHAR) VISIBLE NOT NULL,
  "SOURCE_FILE" VARCHAR2(512 CHAR) VISIBLE,
  "SOURCE_LINE" NUMBER(12,0) VISIBLE,
  "STATUS" VARCHAR2(20 CHAR) VISIBLE DEFAULT 'PROCESSED' NOT NULL,
  "CHARGE_LOG_ID" NUMBER VISIBLE,
  "PROCESSED_TIME" TIMESTAMP(6) VISIBLE DEFAULT SYSTIMESTAMP NOT NULL,
  "RETRY_COUNT" NUMBER(10,0) VISIBLE DEFAULT 0 NOT NULL,
  "LAST_ERROR" VARCHAR2(2000 CHAR) VISIBLE,
  "CREATED_TIME" TIMESTAMP(6) VISIBLE DEFAULT SYSTIMESTAMP NOT NULL,
  "UPDATED_TIME" TIMESTAMP(6) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "RESULT_REQUEST_INBOX"."EVENT_ID" IS 'SHA-256 idempotency key derived from transaction and request identity';
COMMENT ON COLUMN "RESULT_REQUEST_INBOX"."PAYLOAD_HASH" IS 'SHA-256 hash of the normalized durable file payload';
COMMENT ON COLUMN "RESULT_REQUEST_INBOX"."SOURCE_FILE" IS 'Spool/archive file containing the original durable event';
COMMENT ON COLUMN "RESULT_REQUEST_INBOX"."SOURCE_LINE" IS 'Line number of the event in the spool segment';
COMMENT ON COLUMN "RESULT_REQUEST_INBOX"."CHARGE_LOG_ID" IS 'Optional reference to CHARGE_LOG.ID without altering the hot CHARGE_LOG table';
COMMENT ON TABLE "RESULT_REQUEST_INBOX" IS 'Idempotency and audit ledger for KittyFallWs resultRequest file processing';

-- ----------------------------
-- Records of RESULT_REQUEST_INBOX
-- ----------------------------

-- ----------------------------
-- Table structure for ROLE
-- ----------------------------
DROP TABLE "ROLE";
CREATE TABLE "ROLE" (
  "ID" NUMBER VISIBLE,
  "NAME" VARCHAR2(200 BYTE) VISIBLE,
  "DESCRIPTION" VARCHAR2(2000 BYTE) VISIBLE,
  "CODE" VARCHAR2(20 BYTE) VISIBLE,
  "STATUS" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'ACTIVE'
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ROLE
-- ----------------------------
INSERT INTO "ROLE" VALUES ('2004', 'TEST', NULL, 'TEST', 'ACTIVE');
INSERT INTO "ROLE" VALUES ('1', 'ADMIN', NULL, 'ADMIN', 'ACTIVE');
INSERT INTO "ROLE" VALUES ('2', 'REPORT', NULL, 'REPORT', 'ACTIVE');
INSERT INTO "ROLE" VALUES ('2003', 'USER', 'USER', 'USER', 'ACTIVE');

-- ----------------------------
-- Table structure for ROLE_PERMISSION
-- ----------------------------
DROP TABLE "ROLE_PERMISSION";
CREATE TABLE "ROLE_PERMISSION" (
  "ID" NUMBER VISIBLE NOT NULL,
  "ROLE_ID" NUMBER VISIBLE NOT NULL,
  "PERMISSION_ID" NUMBER VISIBLE NOT NULL,
  "STATUS" VARCHAR2(20 BYTE) VISIBLE DEFAULT 'ACTIVE' NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of ROLE_PERMISSION
-- ----------------------------
INSERT INTO "ROLE_PERMISSION" VALUES ('2275', '1', '1013', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2276', '1', '1010', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2277', '1', '1', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2278', '1', '1016', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2279', '1', '1006', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2280', '1', '1007', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2281', '1', '1005', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2282', '1', '1014', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2283', '1', '1011', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2284', '1', '1017', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2285', '1', '1012', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2286', '1', '1015', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2287', '1', '1009', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2288', '1', '2029', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2289', '1', '1008', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2308', '1', '2031', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2309', '1', '2030', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2310', '2004', '2029', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2311', '2004', '2031', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2312', '2004', '2030', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2127', '2', '1005', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2128', '2', '1006', 'ACTIVE');
INSERT INTO "ROLE_PERMISSION" VALUES ('2129', '2', '1007', 'ACTIVE');

-- ----------------------------
-- Table structure for TRANSACTION_ACTION
-- ----------------------------
DROP TABLE "TRANSACTION_ACTION";
CREATE TABLE "TRANSACTION_ACTION" (
  "ID" NUMBER VISIBLE NOT NULL,
  "MSISDN" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "TRANSACTION_ID" VARCHAR2(200 BYTE) VISIBLE NOT NULL,
  "OTP" VARCHAR2(20 BYTE) VISIBLE NOT NULL,
  "CREATED_TIME" DATE VISIBLE DEFAULT sysdate NOT NULL,
  "VALID_TIME" DATE VISIBLE NOT NULL,
  "TIME_LEFT" NUMBER VISIBLE DEFAULT 3 NOT NULL
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of TRANSACTION_ACTION
-- ----------------------------
INSERT INTO "TRANSACTION_ACTION" VALUES ('1340', '95123456789', 'dfhoivwm-89245777', '111111', TO_DATE('2026-07-09 11:48:19', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2026-07-09 11:03:26', 'SYYYY-MM-DD HH24:MI:SS'), '2');

-- ----------------------------
-- Table structure for TRANSACTION_LOG
-- ----------------------------
DROP TABLE "TRANSACTION_LOG";
CREATE TABLE "TRANSACTION_LOG" (
  "TRANSACTION_ID" VARCHAR2(100 BYTE) VISIBLE,
  "TYPE" NUMBER(5,0) VISIBLE,
  "MSISDN" VARCHAR2(15 BYTE) VISIBLE,
  "REQUEST" VARCHAR2(2000 BYTE) VISIBLE,
  "ERROR_CODE" VARCHAR2(50 BYTE) VISIBLE,
  "COMMAND" VARCHAR2(50 BYTE) VISIBLE,
  "REQUEST_TIME" DATE VISIBLE,
  "RESPONSE_TIME" DATE VISIBLE,
  "RESPONSE" VARCHAR2(4000 BYTE) VISIBLE,
  "CHANNEL" VARCHAR2(100 BYTE) VISIBLE,
  "RESULT_VALUE" VARCHAR2(200 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of TRANSACTION_LOG
-- ----------------------------

-- ----------------------------
-- Table structure for WEBSERVICE
-- ----------------------------
DROP TABLE "WEBSERVICE";
CREATE TABLE "WEBSERVICE" (
  "WS_ID" NUMBER(10,0) VISIBLE,
  "WS_NAME" VARCHAR2(1000 BYTE) VISIBLE,
  "WS_CODE" VARCHAR2(100 BYTE) VISIBLE,
  "WSDL" VARCHAR2(1000 BYTE) VISIBLE,
  "MSG_TEMPLATE" VARCHAR2(2000 BYTE) VISIBLE,
  "STATUS" NUMBER(1,0) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of WEBSERVICE
-- ----------------------------
INSERT INTO "WEBSERVICE" VALUES ('7', 'add_data', 'add_data', 'http://10.226.232.65:9186/MPI/Payment?wsdl', '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.payment.mps.viettel.com/">
<soapenv:Header/>
<soapenv:Body>
<ws:doCharge>
<msisdn>#MSISDN</msisdn>
<amount>#AMOUNT</amount>
<serviceName>#SERVICE_NAME</serviceName>
<providerName>#PROVIDER_NAME</providerName>
<channel>EBP</channel>
<subCpName></subCpName>
<category></category>
<item></item>
<command>#CMD</command>
<subService>#SUB_SERVICE_NAME</subService>
<transId>#TRANS_ID</transId>
<charge_type>1</charge_type>
</ws:doCharge>
</soapenv:Body>
</soapenv:Envelope>', '0');
INSERT INTO "WEBSERVICE" VALUES ('1', 'register_otp', 'register_otp', 'http://10.226.234.201:9181/MPS/otp.html?', NULL, '1');
INSERT INTO "WEBSERVICE" VALUES ('2', 'charge_fee', 'charge_fee', 'http://10.226.234.201:9181/MPS/otp.html?', NULL, '1');
INSERT INTO "WEBSERVICE" VALUES ('3', 'add_money', 'add_money', 'http://10.226.234.201:9181/MPS/charge.html?', NULL, '1');
INSERT INTO "WEBSERVICE" VALUES ('4', 'sendmt', 'sendmt184', 'http://10.226.232.201:9201/smsws?wsdl', '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://smsws/xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <xsd:smsRequest>
         <!--Optional:-->
         <xsd:username>184u</xsd:username>
         <!--Optional:-->
         <xsd:password>184p</xsd:password>
         <!--Optional:-->
         <xsd:msisdn>#MSISDN#</xsd:msisdn>
         <!--Optional:-->
         <xsd:content>#CONTENT#</xsd:content>
         <!--Optional:-->
         <xsd:shortcode>184</xsd:shortcode>
         <!--Optional:-->
         <xsd:alias></xsd:alias>
         <!--Optional:-->
         <xsd:params>#PARAM#</xsd:params>
      </xsd:smsRequest>
   </soapenv:Body>
</soapenv:Envelope>', '1');
INSERT INTO "WEBSERVICE" VALUES ('5', 'register', 'register', 'http://10.226.234.201:9181/MPS/OTP.html?', NULL, NULL);
INSERT INTO "WEBSERVICE" VALUES ('6', 'disable', 'disable', 'http://10.226.234.201:9181/MPS/charge.html?', NULL, NULL);

-- ----------------------------
-- Table structure for WS_USER
-- ----------------------------
DROP TABLE "WS_USER";
CREATE TABLE "WS_USER" (
  "WS_USER_ID" NUMBER(10,0) VISIBLE,
  "USERNAME" VARCHAR2(100 BYTE) VISIBLE,
  "PASSWORD" VARCHAR2(100 BYTE) VISIBLE,
  "IP_ADDRESS" VARCHAR2(2000 BYTE) VISIBLE
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;

-- ----------------------------
-- Records of WS_USER
-- ----------------------------
INSERT INTO "WS_USER" VALUES ('1', 'ws_KittyFall', 'KittyFall@123A', '127.0.0.1,10.226.234.75,10.226.40.30,10.226.234.240,10.226.234.239,10.226.232.65,10.226.232.66,10.226.234.92,x.x.x.x');

-- ----------------------------
-- Function structure for ADD_TURN
-- ----------------------------
create or replace NONEDITIONABLE PROCEDURE "ADD_TURN" 
(
  MSISDN_ IN VARCHAR2 
, TURN_ IN NUMBER 
) IS
    v_count     NUMBER;
    v_lucky_id  NUMBER; 
BEGIN
 -- Ki?m tra xem ?ã t?n t?i b?n ghi cho msisdn ch?a
    SELECT COUNT(*) INTO v_count
    FROM lucky_spin
    WHERE msisdn = MSISDN_ ;

    IF v_count > 0 THEN
        -- L?y ID b?n ghi ?? c?p nh?t
        SELECT id INTO v_lucky_id
        FROM lucky_spin
        WHERE msisdn = MSISDN_ AND ROWNUM = 1;

        -- C?p nh?t l??t quay
        UPDATE lucky_spin
        SET added = NVL(added, 0) + TURN_,
            last_update = SYSDATE
        WHERE id = v_lucky_id;

    ELSE
        -- N?u ch?a có b?n ghi ? insert m?i
        INSERT INTO lucky_spin (
            id,
            msisdn,
            added,
            used,
            INSERT_TIME,
            expire_time,
            last_update,
            channel_add
        ) VALUES (
            lucky_spin_seq.NEXTVAL,
            MSISDN_,
            TURN_,
            0,
            SYSDATE,
            SYSDATE + 7,
            SYSDATE,
            1
        );

    END IF;

    COMMIT;
END ADD_TURN;
/

-- ----------------------------
-- Sequence structure for ACCOUNT_ADMIN_SEQ
-- ----------------------------
DROP SEQUENCE "ACCOUNT_ADMIN_SEQ";
CREATE SEQUENCE "ACCOUNT_ADMIN_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ACCOUNT_INFO_SEQ
-- ----------------------------
DROP SEQUENCE "ACCOUNT_INFO_SEQ";
CREATE SEQUENCE "ACCOUNT_INFO_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ACCOUNT_SEQ
-- ----------------------------
DROP SEQUENCE "ACCOUNT_SEQ";
CREATE SEQUENCE "ACCOUNT_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ACCOUNT_USER_SEQ
-- ----------------------------
DROP SEQUENCE "ACCOUNT_USER_SEQ";
CREATE SEQUENCE "ACCOUNT_USER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for CHARGE_LOG_SEQ
-- ----------------------------
DROP SEQUENCE "CHARGE_LOG_SEQ";
CREATE SEQUENCE "CHARGE_LOG_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for LUCKY_SPIN_SEQ
-- ----------------------------
DROP SEQUENCE "LUCKY_SPIN_SEQ";
CREATE SEQUENCE "LUCKY_SPIN_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 ORDER NOCACHE;

-- ----------------------------
-- Sequence structure for MT_HIS_SEQ
-- ----------------------------
DROP SEQUENCE "MT_HIS_SEQ";
CREATE SEQUENCE "MT_HIS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for MT_SEQ
-- ----------------------------
DROP SEQUENCE "MT_SEQ";
CREATE SEQUENCE "MT_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for PACKGSEQ
-- ----------------------------
DROP SEQUENCE "PACKGSEQ";
CREATE SEQUENCE "PACKGSEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for PERMISSION_SEQ
-- ----------------------------
DROP SEQUENCE "PERMISSION_SEQ";
CREATE SEQUENCE "PERMISSION_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for REGISTER_SEQ
-- ----------------------------
DROP SEQUENCE "REGISTER_SEQ";
CREATE SEQUENCE "REGISTER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for REG_INFO_SEQ
-- ----------------------------
DROP SEQUENCE "REG_INFO_SEQ";
CREATE SEQUENCE "REG_INFO_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for REPORT_BY_TIME_SEQ
-- ----------------------------
DROP SEQUENCE "REPORT_BY_TIME_SEQ";
CREATE SEQUENCE "REPORT_BY_TIME_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for ROLE_PERMISSION_SEQ
-- ----------------------------
DROP SEQUENCE "ROLE_PERMISSION_SEQ";
CREATE SEQUENCE "ROLE_PERMISSION_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for ROLE_SEQ
-- ----------------------------
DROP SEQUENCE "ROLE_SEQ";
CREATE SEQUENCE "ROLE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_LEVEL_ATTEMPT
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_LEVEL_ATTEMPT";
CREATE SEQUENCE "SEQ_GAME_LEVEL_ATTEMPT" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_LEVEL_CONFIG
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_LEVEL_CONFIG";
CREATE SEQUENCE "SEQ_GAME_LEVEL_CONFIG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_LEVEL_REWARD_OPTION
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_LEVEL_REWARD_OPTION";
CREATE SEQUENCE "SEQ_GAME_LEVEL_REWARD_OPTION" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MODE
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MODE";
CREATE SEQUENCE "SEQ_GAME_MODE" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_DRAW
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_DRAW";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_DRAW" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_DRAW_TICKET";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_DRAW_TICKET" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_PRIZE_CONFIG";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_PRIZE_CONFIG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_RANKING
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_RANKING";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_RANKING" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_TICKET_RULE
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_TICKET_RULE";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_TICKET_RULE" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_MONTHLY_WINNER
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_MONTHLY_WINNER";
CREATE SEQUENCE "SEQ_GAME_MONTHLY_WINNER" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_PLAY_SESSION
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_PLAY_SESSION";
CREATE SEQUENCE "SEQ_GAME_PLAY_SESSION" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_RESCUE_LOG
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_RESCUE_LOG";
CREATE SEQUENCE "SEQ_GAME_RESCUE_LOG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_REWARD_LIMIT_CONFIG";
CREATE SEQUENCE "SEQ_GAME_REWARD_LIMIT_CONFIG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_REWARD_LIMIT_USAGE
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_REWARD_LIMIT_USAGE";
CREATE SEQUENCE "SEQ_GAME_REWARD_LIMIT_USAGE" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_REWARD_LOG
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_REWARD_LOG";
CREATE SEQUENCE "SEQ_GAME_REWARD_LOG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_GAME_SCORE_LEDGER
-- ----------------------------
DROP SEQUENCE "SEQ_GAME_SCORE_LEDGER";
CREATE SEQUENCE "SEQ_GAME_SCORE_LEDGER" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for TRANSACTION_ACTIVE_SEQ
-- ----------------------------
DROP SEQUENCE "TRANSACTION_ACTIVE_SEQ";
CREATE SEQUENCE "TRANSACTION_ACTIVE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Sequence structure for TRANSACTION_LOG_SEQ
-- ----------------------------
DROP SEQUENCE "TRANSACTION_LOG_SEQ";
CREATE SEQUENCE "TRANSACTION_LOG_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 CACHE 20;

-- ----------------------------
-- Indexes structure for table ACCOUNT_ADMIN
-- ----------------------------
CREATE UNIQUE INDEX "SYS_C0012861"
  ON "ACCOUNT_ADMIN" ("ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table ACCOUNT_ADMIN
-- ----------------------------
ALTER TABLE "ACCOUNT_ADMIN" ADD CONSTRAINT "ACCOUNT_ADMIN_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Primary Key structure for table ACCOUNT_INFO
-- ----------------------------
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "ACCOUNT_INFO_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table ACCOUNT_INFO
-- ----------------------------
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C0012879" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C0012880" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00135668" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00135669" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00208150" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00208151" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00210091" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_INFO" ADD CONSTRAINT "SYS_C00210092" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table ACCOUNT_USER
-- ----------------------------
ALTER TABLE "ACCOUNT_USER" ADD CONSTRAINT "SYS_C0012750" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table ACCOUNT_USER
-- ----------------------------
ALTER TABLE "ACCOUNT_USER" ADD CONSTRAINT "SYS_C00135670" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_USER" ADD CONSTRAINT "SYS_C00208158" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ACCOUNT_USER" ADD CONSTRAINT "SYS_C00210093" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Uniques structure for table CONFIG
-- ----------------------------
ALTER TABLE "CONFIG" ADD CONSTRAINT "CFG_UNK" UNIQUE ("MODULE", "PARAM_NAME") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table GAME_LEVEL_ATTEMPT
-- ----------------------------
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "PK_GAME_LEVEL_ATTEMPT" PRIMARY KEY ("ATTEMPT_ID");

-- ----------------------------
-- Uniques structure for table GAME_LEVEL_ATTEMPT
-- ----------------------------
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "UK_GLA_CHILD_TRANS" UNIQUE ("CHILD_TRANS_ID") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "UK_GLA_SESSION_LEVEL_ATTEMPT" UNIQUE ("SESSION_ID", "LEVEL_NO", "ATTEMPT_NO") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_LEVEL_ATTEMPT
-- ----------------------------
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_ATTEMPT_NO" CHECK (ATTEMPT_NO > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_IS_VALID" CHECK (IS_VALID IS NULL OR IS_VALID IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_LEVEL_NO" CHECK (LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_REWARD_TYPE" CHECK (REWARD_TYPE IS NULL OR REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_SCORE" CHECK (EXPECTED_SCORE >= 0 AND AWARDED_SCORE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "CK_GLA_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4, 5, 6)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208259" CHECK ("ATTEMPT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208260" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208261" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208262" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208263" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208264" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208265" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208266" CHECK ("ATTEMPT_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208267" CHECK ("EXPECTED_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208268" CHECK ("AWARDED_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208269" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208270" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00208271" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210094" CHECK ("ATTEMPT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210095" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210096" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210097" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210098" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210099" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210100" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210101" CHECK ("ATTEMPT_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210102" CHECK ("EXPECTED_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210103" CHECK ("AWARDED_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210104" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210105" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_ATTEMPT" ADD CONSTRAINT "SYS_C00210106" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_LEVEL_ATTEMPT
-- ----------------------------
CREATE INDEX "IDX_GLA_MODE_LEVEL"
  ON "GAME_LEVEL_ATTEMPT" ("MODE_ID" ASC, "LEVEL_NO" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLA_MSISDN_TIME"
  ON "GAME_LEVEL_ATTEMPT" ("MSISDN" ASC, "START_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLA_PARENT_CHILD"
  ON "GAME_LEVEL_ATTEMPT" ("PARENT_CHILD_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLA_REQUEST_HASH"
  ON "GAME_LEVEL_ATTEMPT" ("REQUEST_HASH" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLA_ROOT_TRANS"
  ON "GAME_LEVEL_ATTEMPT" ("ROOT_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLA_SESSION_STATUS"
  ON "GAME_LEVEL_ATTEMPT" ("SESSION_ID" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_LEVEL_CONFIG
-- ----------------------------
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "PK_GAME_LEVEL_CONFIG" PRIMARY KEY ("LEVEL_CONFIG_ID");

-- ----------------------------
-- Uniques structure for table GAME_LEVEL_CONFIG
-- ----------------------------
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "UK_GAME_LEVEL_CONFIG" UNIQUE ("MODE_ID", "LEVEL_NO") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_LEVEL_CONFIG
-- ----------------------------
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "CK_GLC_BASE_SCORE" CHECK (BASE_SCORE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "CK_GLC_IS_MILESTONE" CHECK (IS_MILESTONE IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "CK_GLC_LEVEL_NO" CHECK (LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "CK_GLC_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "CK_GLC_TIME_LIMIT" CHECK (TIME_LIMIT_SECONDS > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208199" CHECK ("LEVEL_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208200" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208201" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208202" CHECK ("BASE_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208203" CHECK ("TIME_LIMIT_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208204" CHECK ("IS_MILESTONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208205" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00208206" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210107" CHECK ("LEVEL_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210108" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210109" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210110" CHECK ("BASE_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210111" CHECK ("TIME_LIMIT_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210112" CHECK ("IS_MILESTONE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210113" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_CONFIG" ADD CONSTRAINT "SYS_C00210114" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_LEVEL_CONFIG
-- ----------------------------
CREATE INDEX "IDX_GLC_MILESTONE"
  ON "GAME_LEVEL_CONFIG" ("MODE_ID" ASC, "IS_MILESTONE" ASC, "LEVEL_NO" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLC_MODE_STATUS"
  ON "GAME_LEVEL_CONFIG" ("MODE_ID" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_LEVEL_REWARD_OPTION
-- ----------------------------
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "PK_GAME_LEVEL_REWARD_OPTION" PRIMARY KEY ("REWARD_OPTION_ID");

-- ----------------------------
-- Uniques structure for table GAME_LEVEL_REWARD_OPTION
-- ----------------------------
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "UK_GLRO_OPTION" UNIQUE ("MODE_ID", "LEVEL_NO", "REWARD_TYPE", "REWARD_VALUE", "REWARD_UNIT") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_LEVEL_REWARD_OPTION
-- ----------------------------
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_IS_DEFAULT" CHECK (IS_DEFAULT IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_LEVEL_NO" CHECK (LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_REWARD_TYPE" CHECK (REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_REWARD_VALUE" CHECK (REWARD_VALUE > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "CK_GLRO_WEIGHT" CHECK (WEIGHT > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208215" CHECK ("REWARD_OPTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208216" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208217" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208218" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208219" CHECK ("REWARD_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208220" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208221" CHECK ("WEIGHT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208222" CHECK ("IS_DEFAULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208223" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00208224" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210115" CHECK ("REWARD_OPTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210116" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210117" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210118" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210119" CHECK ("REWARD_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210120" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210121" CHECK ("WEIGHT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210122" CHECK ("IS_DEFAULT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210123" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_LEVEL_REWARD_OPTION" ADD CONSTRAINT "SYS_C00210124" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_LEVEL_REWARD_OPTION
-- ----------------------------
CREATE INDEX "IDX_GLRO_MODE_LEVEL"
  ON "GAME_LEVEL_REWARD_OPTION" ("MODE_ID" ASC, "LEVEL_NO" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GLRO_TYPE"
  ON "GAME_LEVEL_REWARD_OPTION" ("REWARD_TYPE" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MODE
-- ----------------------------
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "PK_GAME_MODE" PRIMARY KEY ("MODE_ID");

-- ----------------------------
-- Uniques structure for table GAME_MODE
-- ----------------------------
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "UK_GAME_MODE_CODE" UNIQUE ("MODE_CODE") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MODE
-- ----------------------------
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "CK_GAME_MODE_CODE" CHECK (MODE_CODE IN ('EASY', 'NORMAL', 'HARD')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "CK_GAME_MODE_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208188" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208189" CHECK ("MODE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208190" CHECK ("MODE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208191" CHECK ("TIME_LIMIT_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208192" CHECK ("DISPLAY_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208193" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00208194" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210125" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210126" CHECK ("MODE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210127" CHECK ("MODE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210128" CHECK ("TIME_LIMIT_SECONDS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210129" CHECK ("DISPLAY_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210130" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MODE" ADD CONSTRAINT "SYS_C00210131" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_DRAW
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "PK_GAME_MONTHLY_DRAW" PRIMARY KEY ("DRAW_ID");

-- ----------------------------
-- Uniques structure for table GAME_MONTHLY_DRAW
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "UK_GMD_MONTH" UNIQUE ("MONTH_KEY") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_DRAW
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "CK_GMD_MONTH_KEY" CHECK (MONTH_KEY BETWEEN 200001 AND 299912) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "CK_GMD_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "CK_GMD_TOTAL" CHECK (TOTAL_ELIGIBLE >= 0 AND TOTAL_TICKET >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208423" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208424" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208425" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208426" CHECK ("TOTAL_ELIGIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208427" CHECK ("TOTAL_TICKET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00208428" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210132" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210133" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210134" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210135" CHECK ("TOTAL_ELIGIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210136" CHECK ("TOTAL_TICKET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW" ADD CONSTRAINT "SYS_C00210137" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_DRAW
-- ----------------------------
CREATE INDEX "IDX_GMD_STATUS"
  ON "GAME_MONTHLY_DRAW" ("STATUS" ASC, "MONTH_KEY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "PK_GAME_MONTHLY_DRAW_TICKET" PRIMARY KEY ("TICKET_ID");

-- ----------------------------
-- Uniques structure for table GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "UK_GMDT_TICKET" UNIQUE ("DRAW_ID", "TICKET_NO") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "CK_GMDT_MONTH_KEY" CHECK (MONTH_KEY BETWEEN 200001 AND 299912) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "CK_GMDT_TICKET_NO" CHECK (TICKET_NO > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "CK_GMDT_TOTAL_SCORE" CHECK (TOTAL_SCORE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208434" CHECK ("TICKET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208435" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208436" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208437" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208438" CHECK ("TICKET_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208439" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00208440" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210138" CHECK ("TICKET_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210139" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210140" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210141" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210142" CHECK ("TICKET_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210143" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_DRAW_TICKET" ADD CONSTRAINT "SYS_C00210144" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_DRAW_TICKET
-- ----------------------------
CREATE INDEX "IDX_GMDT_DRAW_MSISDN"
  ON "GAME_MONTHLY_DRAW_TICKET" ("DRAW_ID" ASC, "MSISDN" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GMDT_MONTH_MSISDN"
  ON "GAME_MONTHLY_DRAW_TICKET" ("MONTH_KEY" ASC, "MSISDN" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "PK_GAME_MONTHLY_PRIZE_CONFIG" PRIMARY KEY ("PRIZE_CONFIG_ID");

-- ----------------------------
-- Uniques structure for table GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "UK_GMPC_PRIZE_CODE" UNIQUE ("PRIZE_CODE") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "CK_GMPC_QUANTITY" CHECK (QUANTITY > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "CK_GMPC_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "CK_GMPC_VALUE" CHECK (PRIZE_VALUE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208409" CHECK ("PRIZE_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208410" CHECK ("PRIZE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208411" CHECK ("PRIZE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208412" CHECK ("PRIZE_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208413" CHECK ("PRIZE_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208414" CHECK ("QUANTITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208415" CHECK ("DISPLAY_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208416" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00208417" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210145" CHECK ("PRIZE_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210146" CHECK ("PRIZE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210147" CHECK ("PRIZE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210148" CHECK ("PRIZE_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210149" CHECK ("PRIZE_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210150" CHECK ("QUANTITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210151" CHECK ("DISPLAY_ORDER" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210152" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_PRIZE_CONFIG" ADD CONSTRAINT "SYS_C00210153" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_PRIZE_CONFIG
-- ----------------------------
CREATE INDEX "IDX_GMPC_STATUS_ORDER"
  ON "GAME_MONTHLY_PRIZE_CONFIG" ("STATUS" ASC, "DISPLAY_ORDER" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_RANKING
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "PK_GAME_MONTHLY_RANKING" PRIMARY KEY ("RANKING_ID");

-- ----------------------------
-- Uniques structure for table GAME_MONTHLY_RANKING
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "UK_GMR_MONTH_MSISDN" UNIQUE ("MONTH_KEY", "MSISDN") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_RANKING
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "CK_GMR_IS_ELIGIBLE" CHECK (IS_ELIGIBLE IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "CK_GMR_MONTH_KEY" CHECK (MONTH_KEY BETWEEN 200001 AND 299912) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "CK_GMR_TOTALS" CHECK (TOTAL_SCORE >= 0 AND TOTAL_PLAY >= 0 AND MAX_LEVEL_REACHED BETWEEN 0 AND 50 AND TICKET_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208385" CHECK ("RANKING_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208386" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208387" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208388" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208389" CHECK ("TOTAL_PLAY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208390" CHECK ("MAX_LEVEL_REACHED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208391" CHECK ("TICKET_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208392" CHECK ("IS_ELIGIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00208393" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210154" CHECK ("RANKING_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210155" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210156" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210157" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210158" CHECK ("TOTAL_PLAY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210159" CHECK ("MAX_LEVEL_REACHED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210160" CHECK ("TICKET_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210161" CHECK ("IS_ELIGIBLE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_RANKING" ADD CONSTRAINT "SYS_C00210162" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_RANKING
-- ----------------------------
CREATE INDEX "IDX_GMR_ELIGIBLE"
  ON "GAME_MONTHLY_RANKING" ("MONTH_KEY" ASC, "IS_ELIGIBLE" ASC, "TICKET_COUNT" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GMR_MONTH_RANK"
  ON "GAME_MONTHLY_RANKING" ("MONTH_KEY" ASC, "RANK_NO" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GMR_MONTH_SCORE"
  ON "GAME_MONTHLY_RANKING" ("MONTH_KEY" ASC, "TOTAL_SCORE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_TICKET_RULE
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "PK_GAME_MONTHLY_TICKET_RULE" PRIMARY KEY ("TICKET_RULE_ID");

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_TICKET_RULE
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "CK_GMTR_SCORE" CHECK (MIN_SCORE >= 0 AND (MAX_SCORE IS NULL OR MAX_SCORE >= MIN_SCORE)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "CK_GMTR_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "CK_GMTR_TICKET" CHECK (TICKET_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00208400" CHECK ("TICKET_RULE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00208401" CHECK ("MIN_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00208402" CHECK ("TICKET_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00208403" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00208404" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00210163" CHECK ("TICKET_RULE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00210164" CHECK ("MIN_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00210165" CHECK ("TICKET_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00210166" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_TICKET_RULE" ADD CONSTRAINT "SYS_C00210167" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_TICKET_RULE
-- ----------------------------
CREATE INDEX "IDX_GMTR_SCORE_RANGE"
  ON "GAME_MONTHLY_TICKET_RULE" ("MIN_SCORE" ASC, "MAX_SCORE" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_MONTHLY_WINNER
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "PK_GAME_MONTHLY_WINNER" PRIMARY KEY ("WINNER_ID");

-- ----------------------------
-- Uniques structure for table GAME_MONTHLY_WINNER
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "UK_GMW_DRAW_PRIZE_MSISDN" UNIQUE ("DRAW_ID", "PRIZE_CODE", "MSISDN") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_MONTHLY_WINNER
-- ----------------------------
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "CK_GMW_MONTH_KEY" CHECK (MONTH_KEY BETWEEN 200001 AND 299912) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "CK_GMW_PRIZE_VALUE" CHECK (PRIZE_VALUE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "CK_GMW_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208447" CHECK ("WINNER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208448" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208449" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208450" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208451" CHECK ("PRIZE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208452" CHECK ("PRIZE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208453" CHECK ("PRIZE_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208454" CHECK ("PRIZE_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208455" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00208456" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210168" CHECK ("WINNER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210169" CHECK ("DRAW_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210170" CHECK ("MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210171" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210172" CHECK ("PRIZE_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210173" CHECK ("PRIZE_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210174" CHECK ("PRIZE_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210175" CHECK ("PRIZE_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210176" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_MONTHLY_WINNER" ADD CONSTRAINT "SYS_C00210177" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_MONTHLY_WINNER
-- ----------------------------
CREATE INDEX "IDX_GMW_DRAW_STATUS"
  ON "GAME_MONTHLY_WINNER" ("DRAW_ID" ASC, "STATUS" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GMW_MSISDN_MONTH"
  ON "GAME_MONTHLY_WINNER" ("MSISDN" ASC, "MONTH_KEY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GMW_PRIZE_CODE"
  ON "GAME_MONTHLY_WINNER" ("PRIZE_CODE" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_PLAY_SESSION
-- ----------------------------
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "PK_GAME_PLAY_SESSION" PRIMARY KEY ("SESSION_ID");

-- ----------------------------
-- Uniques structure for table GAME_PLAY_SESSION
-- ----------------------------
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "UK_GPS_ROOT_TRANS" UNIQUE ("ROOT_TRANS_ID") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_PLAY_SESSION
-- ----------------------------
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_CHANNEL" CHECK (CHANNEL IS NULL OR CHANNEL IN ('WEB', 'APP', 'USSD', 'SMS', 'SYSTEM')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_LEVEL_RANGE" CHECK (START_LEVEL BETWEEN 1 AND 50 AND CURRENT_LEVEL BETWEEN 1 AND 50 AND MAX_LEVEL_REACHED BETWEEN 0 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4, 5, 6)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_TOTAL_SCORE" CHECK (TOTAL_SCORE >= 0 AND TOTAL_REWARD_SCORE >= 0 AND TOTAL_DATA_MB >= 0 AND TOTAL_LOYALTY >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_TURN_DEDUCTED" CHECK (TURN_DEDUCTED IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "CK_GPS_TURN_SOURCE" CHECK (TURN_SOURCE IS NULL OR TURN_SOURCE IN ('SUB', 'BUY', 'FREE', 'GIFT', 'ADMIN')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208234" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208235" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208236" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208237" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208238" CHECK ("START_LEVEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208239" CHECK ("CURRENT_LEVEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208240" CHECK ("MAX_LEVEL_REACHED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208241" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208242" CHECK ("TOTAL_REWARD_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208243" CHECK ("TOTAL_DATA_MB" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208244" CHECK ("TOTAL_LOYALTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208245" CHECK ("TURN_DEDUCTED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208246" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208247" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208248" CHECK ("LAST_ACTION_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00208249" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210178" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210179" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210180" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210181" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210182" CHECK ("START_LEVEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210183" CHECK ("CURRENT_LEVEL" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210184" CHECK ("MAX_LEVEL_REACHED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210185" CHECK ("TOTAL_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210186" CHECK ("TOTAL_REWARD_SCORE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210187" CHECK ("TOTAL_DATA_MB" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210188" CHECK ("TOTAL_LOYALTY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210189" CHECK ("TURN_DEDUCTED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210190" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210191" CHECK ("START_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210192" CHECK ("LAST_ACTION_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_PLAY_SESSION" ADD CONSTRAINT "SYS_C00210193" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_PLAY_SESSION
-- ----------------------------
CREATE INDEX "IDX_GPS_MODE_TIME"
  ON "GAME_PLAY_SESSION" ("MODE_ID" ASC, "START_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GPS_MSISDN_TIME"
  ON "GAME_PLAY_SESSION" ("MSISDN" ASC, "START_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GPS_REGISTER_ID"
  ON "GAME_PLAY_SESSION" ("REGISTER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GPS_STATUS_TIME"
  ON "GAME_PLAY_SESSION" ("STATUS" ASC, "START_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GPS_USER_ID"
  ON "GAME_PLAY_SESSION" ("USER_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_RESCUE_LOG
-- ----------------------------
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "PK_GAME_RESCUE_LOG" PRIMARY KEY ("RESCUE_ID");

-- ----------------------------
-- Uniques structure for table GAME_RESCUE_LOG
-- ----------------------------
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "UK_GRL_ONE_SESSION" UNIQUE ("SESSION_ID") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_RESCUE_LOG
-- ----------------------------
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "CK_GRL_FEE" CHECK (FEE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "CK_GRL_LEVEL_NO" CHECK (LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "CK_GRL_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208284" CHECK ("RESCUE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208285" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208286" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208287" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208288" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208289" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208290" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208291" CHECK ("FEE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208292" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208293" CHECK ("REQUEST_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00208294" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210194" CHECK ("RESCUE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210195" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210196" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210197" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210198" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210199" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210200" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210201" CHECK ("FEE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210202" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210203" CHECK ("REQUEST_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_RESCUE_LOG" ADD CONSTRAINT "SYS_C00210204" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_RESCUE_LOG
-- ----------------------------
CREATE INDEX "IDX_GRL_CHARGE_TRANS"
  ON "GAME_RESCUE_LOG" ("CHARGE_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRL_MSISDN_TIME"
  ON "GAME_RESCUE_LOG" ("MSISDN" ASC, "REQUEST_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRL_ROOT_TRANS"
  ON "GAME_RESCUE_LOG" ("ROOT_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "PK_GAME_REWARD_LIMIT_CONFIG" PRIMARY KEY ("LIMIT_CONFIG_ID");

-- ----------------------------
-- Uniques structure for table GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "UK_GRLC_CODE" UNIQUE ("LIMIT_CODE") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_EXCEED_ACTION" CHECK (EXCEED_ACTION IN ('BLOCK', 'FALLBACK', 'QUEUE')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_FALLBACK_TYPE" CHECK (FALLBACK_REWARD_TYPE IS NULL OR FALLBACK_REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_FALLBACK_VALUE" CHECK (FALLBACK_REWARD_VALUE IS NULL OR FALLBACK_REWARD_VALUE > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_LEVEL_NO" CHECK (LEVEL_NO IS NULL OR LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_LIMIT_NOT_NULL" CHECK (MAX_TOTAL_VALUE IS NOT NULL OR MAX_TOTAL_COUNT IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_MAX_COUNT" CHECK (MAX_TOTAL_COUNT IS NULL OR MAX_TOTAL_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_MAX_VALUE" CHECK (MAX_TOTAL_VALUE IS NULL OR MAX_TOTAL_VALUE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_PERIOD_TYPE" CHECK (PERIOD_TYPE IN ('DAILY', 'MONTHLY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_REWARD_TYPE" CHECK (REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "CK_GRLC_STATUS" CHECK (STATUS IN (0, 1)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208318" CHECK ("LIMIT_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208319" CHECK ("LIMIT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208320" CHECK ("LIMIT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208321" CHECK ("PERIOD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208322" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208323" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208324" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208325" CHECK ("EXCEED_ACTION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208326" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00208327" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210205" CHECK ("LIMIT_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210206" CHECK ("LIMIT_CODE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210207" CHECK ("LIMIT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210208" CHECK ("PERIOD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210209" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210210" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210211" CHECK ("PRIORITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210212" CHECK ("EXCEED_ACTION" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210213" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_CONFIG" ADD CONSTRAINT "SYS_C00210214" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_REWARD_LIMIT_CONFIG
-- ----------------------------
CREATE INDEX "IDX_GRLC_EFFECTIVE"
  ON "GAME_REWARD_LIMIT_CONFIG" ("STATUS" ASC, "EFFECTIVE_FROM" ASC, "EFFECTIVE_TO" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRLC_LOOKUP"
  ON "GAME_REWARD_LIMIT_CONFIG" ("STATUS" ASC, "PERIOD_TYPE" ASC, "REWARD_TYPE" ASC, "REWARD_UNIT" ASC, "MODE_ID" ASC, "LEVEL_NO" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRLC_PRIORITY"
  ON "GAME_REWARD_LIMIT_CONFIG" ("STATUS" ASC, "PRIORITY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_REWARD_LIMIT_USAGE
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "PK_GAME_REWARD_LIMIT_USAGE" PRIMARY KEY ("LIMIT_USAGE_ID");

-- ----------------------------
-- Uniques structure for table GAME_REWARD_LIMIT_USAGE
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "UK_GRLU_LIMIT_PERIOD" UNIQUE ("LIMIT_CONFIG_ID", "PERIOD_KEY") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_REWARD_LIMIT_USAGE
-- ----------------------------
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "CK_GRLU_PERIOD_KEY" CHECK (PERIOD_KEY BETWEEN 200001 AND 29991231) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "CK_GRLU_PERIOD_TYPE" CHECK (PERIOD_TYPE IN ('DAILY', 'MONTHLY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "CK_GRLU_REWARD_TYPE" CHECK (REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "CK_GRLU_USED_COUNT" CHECK (USED_TOTAL_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "CK_GRLU_USED_VALUE" CHECK (USED_TOTAL_VALUE >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208341" CHECK ("LIMIT_USAGE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208342" CHECK ("LIMIT_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208343" CHECK ("PERIOD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208344" CHECK ("PERIOD_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208345" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208346" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208347" CHECK ("USED_TOTAL_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208348" CHECK ("USED_TOTAL_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208349" CHECK ("LAST_UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00208350" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210215" CHECK ("LIMIT_USAGE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210216" CHECK ("LIMIT_CONFIG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210217" CHECK ("PERIOD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210218" CHECK ("PERIOD_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210219" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210220" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210221" CHECK ("USED_TOTAL_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210222" CHECK ("USED_TOTAL_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210223" CHECK ("LAST_UPDATE_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LIMIT_USAGE" ADD CONSTRAINT "SYS_C00210224" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_REWARD_LIMIT_USAGE
-- ----------------------------
CREATE INDEX "IDX_GRLU_PERIOD_TYPE_KEY"
  ON "GAME_REWARD_LIMIT_USAGE" ("PERIOD_TYPE" ASC, "PERIOD_KEY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRLU_REWARD_TYPE"
  ON "GAME_REWARD_LIMIT_USAGE" ("REWARD_TYPE" ASC, "REWARD_UNIT" ASC, "PERIOD_KEY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_REWARD_LOG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "PK_GAME_REWARD_LOG" PRIMARY KEY ("REWARD_LOG_ID");

-- ----------------------------
-- Uniques structure for table GAME_REWARD_LOG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "UK_GRWL_ATTEMPT" UNIQUE ("ATTEMPT_ID") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_REWARD_LOG
-- ----------------------------
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "CK_GRWL_LEVEL_NO" CHECK (LEVEL_NO BETWEEN 1 AND 50) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "CK_GRWL_RETRY_COUNT" CHECK (RETRY_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "CK_GRWL_REWARD_TYPE" CHECK (REWARD_TYPE IN ('DATA', 'LOYALTY', 'SCORE', 'MONEY')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "CK_GRWL_REWARD_VALUE" CHECK (REWARD_VALUE > 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "CK_GRWL_STATUS" CHECK (STATUS IN (0, 1, 2, 3, 4)) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208359" CHECK ("REWARD_LOG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208360" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208361" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208362" CHECK ("ATTEMPT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208363" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208364" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208365" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208366" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208367" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208368" CHECK ("REWARD_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208369" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208370" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208371" CHECK ("RETRY_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00208372" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210225" CHECK ("REWARD_LOG_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210226" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210227" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210228" CHECK ("ATTEMPT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210229" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210230" CHECK ("CHILD_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210231" CHECK ("MODE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210232" CHECK ("LEVEL_NO" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210233" CHECK ("REWARD_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210234" CHECK ("REWARD_VALUE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210235" CHECK ("REWARD_UNIT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210236" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210237" CHECK ("RETRY_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_REWARD_LOG" ADD CONSTRAINT "SYS_C00210238" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_REWARD_LOG
-- ----------------------------
CREATE INDEX "IDX_GRWL_EXTERNAL_TRANS"
  ON "GAME_REWARD_LOG" ("EXTERNAL_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRWL_LIMIT_CONFIG"
  ON "GAME_REWARD_LOG" ("LIMIT_CONFIG_ID" ASC, "CREATED_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRWL_MSISDN_TIME"
  ON "GAME_REWARD_LOG" ("MSISDN" ASC, "CREATED_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRWL_ROOT_TRANS"
  ON "GAME_REWARD_LOG" ("ROOT_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GRWL_STATUS"
  ON "GAME_REWARD_LOG" ("STATUS" ASC, "CREATED_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table GAME_SCORE_LEDGER
-- ----------------------------
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "PK_GAME_SCORE_LEDGER" PRIMARY KEY ("LEDGER_ID");

-- ----------------------------
-- Uniques structure for table GAME_SCORE_LEDGER
-- ----------------------------
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "UK_GSL_ATTEMPT_TYPE" UNIQUE ("ATTEMPT_ID", "SCORE_TYPE") NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Checks structure for table GAME_SCORE_LEDGER
-- ----------------------------
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "CK_GSL_DATE_KEY" CHECK (CREATED_DATE_KEY BETWEEN 20000101 AND 29991231) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "CK_GSL_MONTH_KEY" CHECK (CREATED_MONTH_KEY BETWEEN 200001 AND 299912) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "CK_GSL_SCORE_TYPE" CHECK (SCORE_TYPE IN ('LEVEL', 'REWARD', 'ADJUST', 'CANCEL')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208302" CHECK ("LEDGER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208303" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208304" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208305" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208306" CHECK ("SCORE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208307" CHECK ("SCORE_DELTA" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208308" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208309" CHECK ("CREATED_DATE_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00208310" CHECK ("CREATED_MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210239" CHECK ("LEDGER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210240" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210241" CHECK ("SESSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210242" CHECK ("ROOT_TRANS_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210243" CHECK ("SCORE_TYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210244" CHECK ("SCORE_DELTA" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210245" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210246" CHECK ("CREATED_DATE_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "GAME_SCORE_LEDGER" ADD CONSTRAINT "SYS_C00210247" CHECK ("CREATED_MONTH_KEY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table GAME_SCORE_LEDGER
-- ----------------------------
CREATE INDEX "IDX_GSL_CHILD_TRANS"
  ON "GAME_SCORE_LEDGER" ("CHILD_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GSL_MONTH_TIME"
  ON "GAME_SCORE_LEDGER" ("CREATED_MONTH_KEY" ASC, "CREATED_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GSL_MSISDN_MONTH"
  ON "GAME_SCORE_LEDGER" ("MSISDN" ASC, "CREATED_MONTH_KEY" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GSL_ROOT_TRANS"
  ON "GAME_SCORE_LEDGER" ("ROOT_TRANS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IDX_GSL_SESSION"
  ON "GAME_SCORE_LEDGER" ("SESSION_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table LUCKY_SPIN
-- ----------------------------
ALTER TABLE "LUCKY_SPIN" ADD CONSTRAINT "LS_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table LUCKY_SPIN
-- ----------------------------
ALTER TABLE "LUCKY_SPIN" ADD CONSTRAINT "SYS_C00210248" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table LUCKY_SPIN
-- ----------------------------
CREATE INDEX "LS_MSISDN_IDX"
  ON "LUCKY_SPIN" ("MSISDN" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table MT
-- ----------------------------
ALTER TABLE "MT" ADD CONSTRAINT "SYS_C0012856" PRIMARY KEY ("MT_ID");

-- ----------------------------
-- Checks structure for table MT
-- ----------------------------
ALTER TABLE "MT" ADD CONSTRAINT "SYS_C00135700" CHECK ("MT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "MT" ADD CONSTRAINT "SYS_C00208144" CHECK ("MT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "MT" ADD CONSTRAINT "SYS_C00210249" CHECK ("MT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table REG_INFO
-- ----------------------------
ALTER TABLE "REG_INFO" ADD CONSTRAINT "SYS_C0012857" PRIMARY KEY ("REGISTER_ID");

-- ----------------------------
-- Checks structure for table REG_INFO
-- ----------------------------
ALTER TABLE "REG_INFO" ADD CONSTRAINT "SYS_C00135726" CHECK ("REGISTER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "REG_INFO" ADD CONSTRAINT "SYS_C00208147" CHECK ("REGISTER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "REG_INFO" ADD CONSTRAINT "SYS_C00210250" CHECK ("REGISTER_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table REG_INFO
-- ----------------------------
CREATE INDEX "REG_INFO_MSISDN_IDX"
  ON "REG_INFO" ("MSISDN" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table RESULT_REQUEST_INBOX
-- ----------------------------
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "PK_RESULT_REQUEST_INBOX" PRIMARY KEY ("EVENT_ID");

-- ----------------------------
-- Checks structure for table RESULT_REQUEST_INBOX
-- ----------------------------
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "CK_RESULT_REQUEST_RETRY" CHECK (RETRY_COUNT >= 0) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "CK_RESULT_REQUEST_STATUS" CHECK (STATUS IN ('PROCESSING', 'PROCESSED', 'SKIPPED', 'FAILED')) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210562" CHECK ("EVENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210563" CHECK ("SERVICE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210564" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210565" CHECK ("REQUEST_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210566" CHECK ("PAYLOAD_HASH" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210567" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210568" CHECK ("PROCESSED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210569" CHECK ("RETRY_COUNT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "RESULT_REQUEST_INBOX" ADD CONSTRAINT "SYS_C00210570" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table RESULT_REQUEST_INBOX
-- ----------------------------
CREATE INDEX "IX_RRI_REQUEST_TIME"
  ON "RESULT_REQUEST_INBOX" ("REQUEST_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IX_RRI_STATUS_PROCESSED"
  ON "RESULT_REQUEST_INBOX" ("STATUS" ASC, "PROCESSED_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "IX_RRI_TRANSACTION_SERVICE"
  ON "RESULT_REQUEST_INBOX" ("TRANSACTION_ID" ASC, "SERVICE_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Primary Key structure for table ROLE_PERMISSION
-- ----------------------------
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "ROLE_PERMISSION_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Primary Key structure for table ROLE
-- ----------------------------
ALTER TABLE "ROLE" ADD CONSTRAINT "ROLE_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Primary Key structure for table PERMISSION
-- ----------------------------
ALTER TABLE "PERMISSION" ADD CONSTRAINT "PERMISSION_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table ROLE_PERMISSION
-- ----------------------------
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00208161" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00208162" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00208163" CHECK ("PERMISSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00208164" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00210251" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00210252" CHECK ("ROLE_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00210253" CHECK ("PERMISSION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "ROLE_PERMISSION" ADD CONSTRAINT "SYS_C00210254" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table TRANSACTION_ACTION
-- ----------------------------
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "TRANSACTION_ACTION_PK" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table TRANSACTION_ACTION
-- ----------------------------
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012741" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012742" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012743" CHECK ("TRANSACTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012744" CHECK ("OTP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012745" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012746" CHECK ("VALID_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C0012747" CHECK ("TIME_LEFT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135757" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135758" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135759" CHECK ("TRANSACTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135760" CHECK ("OTP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135761" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135762" CHECK ("VALID_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00135763" CHECK ("TIME_LEFT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208166" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208167" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208168" CHECK ("TRANSACTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208169" CHECK ("OTP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208170" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208171" CHECK ("VALID_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00208172" CHECK ("TIME_LEFT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210255" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210256" CHECK ("MSISDN" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210257" CHECK ("TRANSACTION_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210258" CHECK ("OTP" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210259" CHECK ("CREATED_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210260" CHECK ("VALID_TIME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "TRANSACTION_ACTION" ADD CONSTRAINT "SYS_C00210261" CHECK ("TIME_LEFT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Indexes structure for table TRANSACTION_LOG
-- ----------------------------
CREATE INDEX "TLOG_ISDN_IDX"
  ON "TRANSACTION_LOG" ("MSISDN" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
CREATE INDEX "TLOG_RT_IDX"
  ON "TRANSACTION_LOG" ("REQUEST_TIME" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;

-- ----------------------------
-- Indexes structure for table WEBSERVICE
-- ----------------------------
CREATE UNIQUE INDEX "WS_PK"
  ON "WEBSERVICE" ("WS_ID" ASC)
  LOGGING
  VISIBLE
PCTFREE 10
INITRANS 2
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
  FLASH_CACHE DEFAULT
)
   USABLE;
