/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.4.95
 Source Server Type    : MySQL
 Source Server Version : 100621 (10.6.21-MariaDB-0ubuntu0.22.04.2)
 Source Host           : 192.168.4.95:3306
 Source Schema         : RCM_RC_DB

 Target Server Type    : MySQL
 Target Server Version : 100621 (10.6.21-MariaDB-0ubuntu0.22.04.2)
 File Encoding         : 65001

 Date: 17/06/2025 16:59:02
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for card_info
-- ----------------------------
DROP TABLE IF EXISTS `card_info`;
CREATE TABLE `card_info`  (
  `card_no` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `card_hrn` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `face_value` int UNSIGNED NULL DEFAULT NULL,
  `card_status` tinyint NULL DEFAULT NULL,
  `expiry_date` bigint NULL DEFAULT NULL,
  `valid_time` int UNSIGNED NOT NULL DEFAULT 0,
  `msisdn_used` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '--',
  `updated_date` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0000000000000',
  PRIMARY KEY (`card_no`) USING BTREE,
  UNIQUE INDEX `card_no`(`card_no`) USING BTREE,
  UNIQUE INDEX `card_hrn`(`card_hrn`) USING BTREE,
  INDEX `card_status`(`card_status`) USING BTREE,
  INDEX `updated_date`(`updated_date`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for daily_report
-- ----------------------------
DROP TABLE IF EXISTS `daily_report`;
CREATE TABLE `daily_report`  (
  `date` date NOT NULL DEFAULT '0000-00-00',
  `yesterday_balance` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `today_recharge` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `today_charge` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `today_balance` varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `fresh_user_num` int NOT NULL DEFAULT 0,
  `normal_user_num` int NOT NULL DEFAULT 0,
  `suspend_user_num` int NOT NULL DEFAULT 0,
  `blacklist_user_num` int NOT NULL DEFAULT 0,
  `released_user_num` int NOT NULL DEFAULT 0,
  `opr_trial_user_num` int NOT NULL DEFAULT 0,
  `total_user_num` int NOT NULL DEFAULT 0,
  `precard_facevalue1` int NOT NULL DEFAULT 0,
  `precard_used_today1` int NOT NULL DEFAULT 0,
  `precard_unused1` int NOT NULL DEFAULT 0,
  `precard_facevalue2` int NOT NULL DEFAULT 0,
  `precard_used_today2` int NOT NULL DEFAULT 0,
  `precard_unused2` int NOT NULL DEFAULT 0,
  `precard_facevalue3` int NOT NULL DEFAULT 0,
  `precard_used_today3` int NOT NULL DEFAULT 0,
  `precard_unused3` int NOT NULL DEFAULT 0,
  `precard_facevalue4` int NOT NULL DEFAULT 0,
  `precard_used_today4` int NOT NULL DEFAULT 0,
  `precard_unused4` int NOT NULL DEFAULT 0,
  `precard_facevalue5` int NOT NULL DEFAULT 0,
  `precard_used_today5` int NOT NULL DEFAULT 0,
  `precard_unused5` int NOT NULL DEFAULT 0,
  `precard_facevalue6` int NOT NULL DEFAULT 0,
  `precard_used_today6` int NOT NULL DEFAULT 0,
  `precard_unused6` int NOT NULL DEFAULT 0,
  `incoming_call_num` int NOT NULL DEFAULT 0,
  `incoming_call_duration` int NOT NULL DEFAULT 0,
  `incoming_call_charge` int NOT NULL DEFAULT 0,
  `local_callout_num` int NOT NULL DEFAULT 0,
  `local_callout_duration` int NOT NULL DEFAULT 0,
  `local_callout_charge` int NOT NULL DEFAULT 0,
  `IDD_call_num` int NOT NULL DEFAULT 0,
  `IDD_call_duration` int NOT NULL DEFAULT 0,
  `IDD_call_charge` int NOT NULL DEFAULT 0,
  `NDD_call_num` int NOT NULL DEFAULT 0,
  `NDD_call_duration` int NOT NULL DEFAULT 0,
  `NDD_call_charge` int NOT NULL DEFAULT 0,
  `rent_charging_num` int NOT NULL DEFAULT 0,
  `rent_charging_duration` int NOT NULL DEFAULT 0,
  `rent_charge` int NOT NULL DEFAULT 0,
  `ast_recharge_num` int NOT NULL DEFAULT 0,
  `ast_recharge_duration` int NOT NULL DEFAULT 0,
  `ast_recharge` int NOT NULL DEFAULT 0,
  `ast_charge_num` int NOT NULL DEFAULT 0,
  `ast_charge_duration` int NOT NULL DEFAULT 0,
  `ast_charge` int NOT NULL DEFAULT 0,
  `recharge_suc_num` int NOT NULL DEFAULT 0,
  `recharge_suc_duration` int NOT NULL DEFAULT 0,
  `recharge_suc` int NOT NULL DEFAULT 0,
  `recharge_fail_num` int NOT NULL DEFAULT 0,
  `recharge_fail_duration` int NOT NULL DEFAULT 0,
  `recharge_fail` int NOT NULL DEFAULT 0,
  `short_message_num` int NOT NULL DEFAULT 0,
  `short_message_duration` int NOT NULL DEFAULT 0,
  `short_message_charge` int NOT NULL DEFAULT 0,
  `short_message_via_web_num` int NOT NULL DEFAULT 0,
  `short_message_via_web_duration` int NOT NULL DEFAULT 0,
  `short_message_via_web_charge` int NOT NULL DEFAULT 0,
  `conference_call_num` int NOT NULL DEFAULT 0,
  `conference_call_duration` int NOT NULL DEFAULT 0,
  `conference_call_charge` int NOT NULL DEFAULT 0,
  `total_call_num` int NOT NULL DEFAULT 0,
  `total_call_duration` int NOT NULL DEFAULT 0,
  `total_call_charge` int NOT NULL DEFAULT 0,
  `gprs_volume` varchar(24) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `gprs_duration` varchar(24) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `gprs_charged` varchar(24) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  PRIMARY KEY (`date`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for used_card_info
-- ----------------------------
DROP TABLE IF EXISTS `used_card_info`;
CREATE TABLE `used_card_info`  (
  `card_no` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `card_hrn` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `face_value` int UNSIGNED NULL DEFAULT NULL,
  `card_status` tinyint NULL DEFAULT NULL,
  `expiry_date` datetime NULL DEFAULT NULL,
  `valid_time` int UNSIGNED NOT NULL DEFAULT 0,
  `msisdn_used` char(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
  `updated_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`card_no`) USING BTREE,
  UNIQUE INDEX `card_hrn`(`card_hrn`) USING BTREE,
  INDEX `card_status`(`card_status`) USING BTREE,
  INDEX `updated_date`(`updated_date`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info`  (
  `msisdn` char(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `PIN` char(6) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '123456',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 0,
  `balance` int NOT NULL DEFAULT 0,
  `promo_balance` int NOT NULL DEFAULT 0,
  `overdraft` int NOT NULL DEFAULT 0,
  `access_date` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '00000000000000',
  `mo_expiration_date` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '00000000000000',
  `mt_expiration_date` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '00000000000000',
  `promo_exp_date` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `cos_id` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '00',
  `rent_type` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '00',
  `home_location0` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `home_location1` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '1',
  `home_location2` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '2',
  `home_location3` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '3',
  `cug_id` smallint NOT NULL DEFAULT 0,
  `language_type` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `recharge_fail_counter` char(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `sm_inquiry_counter` char(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `latch_flag` char(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `fav_numbers` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `fav_change_counter` char(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0',
  `favorite_number0` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `favorite_number1` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `favorite_number2` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `favorite_number3` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `favorite_number4` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `last_call_type` tinyint NOT NULL DEFAULT 0,
  `last_call_time` char(14) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `last_call_number` char(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `cap_sm_balance0` int NOT NULL DEFAULT 0,
  `cap_sm_counter0` int NOT NULL DEFAULT 0,
  `cap_sm_balance1` int NOT NULL DEFAULT 0,
  `cap_sm_counter1` int NOT NULL DEFAULT 0,
  `cap_call_balance0` int NOT NULL DEFAULT 0,
  `cap_call_duration0` int NOT NULL DEFAULT 0,
  `cap_call_balance1` int NOT NULL DEFAULT 0,
  `cap_call_duration1` int NOT NULL DEFAULT 0,
  `free_sms_remaining_days` int NOT NULL DEFAULT 0,
  `pool_account_type` int NOT NULL DEFAULT 0,
  `child_account_number` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `child_number_edit_count` int NOT NULL DEFAULT 0,
  `child_number1` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `child_number2` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `child_number3` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `child_number4` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `child_number5` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `parent_number` char(18) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `intraday_calls` int NOT NULL DEFAULT 0,
  `intraday_sms` int NOT NULL DEFAULT 0,
  `intraday_charged_balance` int NOT NULL DEFAULT 0,
  `cap_gprs_volume` int NOT NULL DEFAULT 0,
  `cap_gprs_balance` int NOT NULL DEFAULT 0,
  `gprs_volume_this_month` int NOT NULL DEFAULT 0,
  `gprs_notification_times_today` int NOT NULL DEFAULT 0,
  `callme_back_request_times` int NOT NULL DEFAULT 0,
  PRIMARY KEY (`msisdn`) USING BTREE,
  INDEX `account_status`(`status`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed;

SET FOREIGN_KEY_CHECKS = 1;
