CREATE TABLE `virtual_goods_list` (
  `p_seq` int(11) NOT NULL DEFAULT 0 COMMENT '상품등록 코드',
  `p_name` varchar(32) DEFAULT NULL COMMENT '종목명',
  `p_price` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '마감시간',
  `p_sell_state` varchar(32) DEFAULT NULL COMMENT '상품 판매 상태 (SELL:판매중, SOLDOUT:판매완료)',
  PRIMARY KEY (`p_seq`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `charge_type` (
  `level` int(11) NOT NULL,
  `charge_type` int(11) NOT NULL comment '0-캐쉬, 1-코인, 2-가상계좌',
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='레벨별 충전방식';

INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('1', '1', '코인충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('2', '1', '코인충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('3', '2', '가상계좌');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('4', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('5', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('6', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('7', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('8', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('9', '0', '캐쉬충전');
INSERT INTO `mydb`.`charge_type` (`level`, `charge_type`, `name`) VALUES ('10', '0', '캐쉬충전');

UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '4');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '5');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '6');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '7');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '8');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '9');
UPDATE `mydb`.`charge_type` SET `charge_type` = '1' WHERE (`level` = '10');
UPDATE `mydb`.`charge_type` SET `charge_type` = '2' WHERE (`level` = '1');
UPDATE `mydb`.`charge_type` SET `charge_type` = '2' WHERE (`level` = '2');
UPDATE `mydb`.`charge_type` SET `charge_type` = '3' WHERE (`level` = '3');

ALTER TABLE `mydb`.`t_log_cash` 
CHANGE COLUMN `ac_code` `ac_code` SMALLINT(6) NULL DEFAULT 0 COMMENT '    /*1:충전,2:환전,3:베팅,4:베팅취소,5:포인트전환(추가),6:포인트차감,10:포인트충전,7:베팅결과처리,8:이벤트충전,9:이벤트차감,101:충전요청,102:환전요청,103:계좌조회,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n             * 111:충전요청취소,112:환전요청취소,113:충전취소,114:환전취소,121:관리자충전,122:관리자회수,123:관리자 포인트 충전, 124:관리자 포인트 회수,125 : 관리자 환전 회수,998:데이터복구,999:기타 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n     \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n201 : 정산 취소,202 : 정산 포인트 취소,203 : 정산 추천인 포인트 취소,204 : 충전 대기 ,205 : 환전요청 대기, 301 : 총판정산,302 : 코인충전요청, 303:코인충전완료, 304:미입금유저레벨 변경       */' ;
