-- ============================================================
-- FULL DATABASE REBUILD - drops and recreates mtplayyyy
-- Run: mysql -u root < rebuild_db.sql
-- ============================================================

DROP DATABASE IF EXISTS mtplayyyy;
CREATE DATABASE mtplayyyy CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci;
USE mtplayyyy;

-- admin
CREATE TABLE admin (
    id int(11) NOT NULL AUTO_INCREMENT,
    wingo1 text NOT NULL, wingo3 text NOT NULL, wingo5 text NOT NULL, wingo10 text NOT NULL,
    k5d text NOT NULL, k5d3 text NOT NULL, k5d5 text, k5d10 text NOT NULL,
    k3d text NOT NULL, k3d3 text NOT NULL, k3d5 text NOT NULL, k3d10 text NOT NULL,
    win_rate int(11) NOT NULL DEFAULT 0,
    telegram varchar(100) NOT NULL DEFAULT '0',
    cskh varchar(100) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO admin VALUES (1,'-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1',80,'https://t.me/support','https://t.me/support');

-- admin_ac
CREATE TABLE admin_ac (
    id int(11) NOT NULL AUTO_INCREMENT,
    wingo1 text NOT NULL, wingo3 text NOT NULL, wingo5 text NOT NULL, wingo10 text NOT NULL,
    k5d text NOT NULL, k5d3 text NOT NULL, k5d5 text, k5d10 text NOT NULL,
    k3d text, k3d3 text, k3d5 text, k3d10 text,
    bs1 text, bs3 text, bs5 text, bs10 text,
    win_rate int(11) NOT NULL DEFAULT 80,
    telegram varchar(100) NOT NULL DEFAULT 'https://t.me/support',
    cskh varchar(100) NOT NULL DEFAULT 'https://t.me/support',
    app varchar(100) NOT NULL DEFAULT '#',
    site_name varchar(100) NOT NULL DEFAULT 'ColorKing',
    logo_url varchar(255) NOT NULL DEFAULT '',
    primary_color varchar(20) NOT NULL DEFAULT '#f95959',
    secondary_color varchar(20) NOT NULL DEFAULT '#ff9a3c',
    nav_bg_color varchar(20) NOT NULL DEFAULT '#1a1a2e',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO admin_ac (id,wingo1,wingo3,wingo5,wingo10,k5d,k5d3,k5d5,k5d10,k3d,k3d3,k3d5,k3d10,bs1,bs3,bs5,bs10,win_rate,telegram,cskh,app)
VALUES (1,'-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1',80,'https://t.me/support','https://t.me/support','#');

-- level
CREATE TABLE level (
    id int(11) NOT NULL AUTO_INCREMENT,
    level int(11) NOT NULL DEFAULT 0,
    f1 float NOT NULL DEFAULT 0, f2 float NOT NULL DEFAULT 0,
    f3 float NOT NULL DEFAULT 0, f4 float NOT NULL DEFAULT 0,
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO level VALUES (1,0,0.6,0.18,0.054,0.0162),(2,1,0.7,0.21,0.063,0.0189),(3,2,0.75,0.225,0.0675,0.0203),(4,3,0.8,0.24,0.072,0.0216),(5,4,0.85,0.255,0.0765,0.023),(6,5,0.9,0.27,0.081,0.0243),(7,6,1,0.3,0.09,0.027);

-- bank_recharge
CREATE TABLE bank_recharge (
    id int(11) NOT NULL AUTO_INCREMENT,
    name_bank varchar(100) NOT NULL DEFAULT '0',
    name_user varchar(100) NOT NULL DEFAULT '0',
    stk varchar(50) NOT NULL DEFAULT '0',
    qr_code_image varchar(255) NOT NULL DEFAULT '',
    account_number varchar(50) NOT NULL DEFAULT '',
    instructions varchar(255) NOT NULL DEFAULT '',
    type varchar(20) NOT NULL DEFAULT 'bank',
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- recharge
CREATE TABLE recharge (
    id int(11) NOT NULL AUTO_INCREMENT,
    id_order varchar(100) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    type varchar(20) NOT NULL DEFAULT '0',
    remaining_bet float NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- withdraw
CREATE TABLE withdraw (
    id int(11) NOT NULL AUTO_INCREMENT,
    id_order varchar(100) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    name_bank varchar(100) NOT NULL DEFAULT '0',
    name_user varchar(100) NOT NULL DEFAULT '0',
    stk varchar(100) NOT NULL DEFAULT '0',
    ifsc varchar(50) NOT NULL DEFAULT '0',
    sdt varchar(50) NOT NULL DEFAULT '0',
    tp varchar(20) NOT NULL DEFAULT 'bank',
    remarks varchar(255) NOT NULL DEFAULT '',
    order_id varchar(100) NOT NULL DEFAULT '',
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- wingo
CREATE TABLE wingo (
    id int(11) NOT NULL AUTO_INCREMENT,
    period varchar(30) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    result varchar(10) NOT NULL DEFAULT '0',
    amount float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    release_status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO wingo (period,game,result,amount,status,release_status,time) VALUES ('2022070110000','wingo10','6',6,1,1,UNIX_TIMESTAMP()*1000),('2022070110001','wingo10','0',0,0,0,UNIX_TIMESTAMP()*1000),('2022070110000','wingo5','6',6,1,1,UNIX_TIMESTAMP()*1000),('2022070110001','wingo5','0',0,0,0,UNIX_TIMESTAMP()*1000),('2022070110000','wingo3','6',6,1,1,UNIX_TIMESTAMP()*1000),('2022070110001','wingo3','0',0,0,0,UNIX_TIMESTAMP()*1000),('2022070110000','wingo','6',6,1,1,UNIX_TIMESTAMP()*1000),('2022070110001','wingo','0',0,0,0,UNIX_TIMESTAMP()*1000);

-- 5d
CREATE TABLE `5d` (
    id int(11) NOT NULL AUTO_INCREMENT,
    period varchar(30) NOT NULL DEFAULT '0',
    result varchar(30) NOT NULL DEFAULT '0',
    game int(11) NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO `5d` (period,result,game,status,time) VALUES ('2022070110000','23521',10,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',10,0,UNIX_TIMESTAMP()*1000),('2022070110000','23521',5,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',5,0,UNIX_TIMESTAMP()*1000),('2022070110000','23521',3,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',3,0,UNIX_TIMESTAMP()*1000),('2022070110000','23521',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',1,0,UNIX_TIMESTAMP()*1000);

-- k3
CREATE TABLE k3 (
    id int(11) NOT NULL AUTO_INCREMENT,
    period varchar(30) NOT NULL DEFAULT '0',
    result varchar(30) NOT NULL DEFAULT '0',
    game int(11) NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO k3 (period,result,game,status,time) VALUES ('2022070110000','235',10,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',10,0,UNIX_TIMESTAMP()*1000),('2022070110000','235',5,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',5,0,UNIX_TIMESTAMP()*1000),('2022070110000','235',3,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',3,0,UNIX_TIMESTAMP()*1000),('2022070110000','235',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0',1,0,UNIX_TIMESTAMP()*1000);

-- trx_wingo
CREATE TABLE trx_wingo (
    id int(11) NOT NULL AUTO_INCREMENT,
    period varchar(30) NOT NULL DEFAULT '0',
    result varchar(10) NOT NULL DEFAULT '0',
    status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- trx_wingo_game
CREATE TABLE trx_wingo_game (
    id int(11) NOT NULL AUTO_INCREMENT,
    period varchar(30) NOT NULL DEFAULT '0',
    result varchar(10) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT 'trx_wingo',
    status int(11) NOT NULL DEFAULT 0,
    release_status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
INSERT INTO trx_wingo_game (period,result,game,status,release_status,time) VALUES ('2022070110000','0','trx_wingo',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0','trx_wingo',0,0,UNIX_TIMESTAMP()*1000),('2022070110000','0','trx_wingo3',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0','trx_wingo3',0,0,UNIX_TIMESTAMP()*1000),('2022070110000','0','trx_wingo5',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0','trx_wingo5',0,0,UNIX_TIMESTAMP()*1000),('2022070110000','0','trx_wingo10',1,1,UNIX_TIMESTAMP()*1000),('2022070110001','0','trx_wingo10',0,0,UNIX_TIMESTAMP()*1000);

-- trx_wingo_bet
CREATE TABLE trx_wingo_bet (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- trx_wingo_bets
CREATE TABLE trx_wingo_bets (
    id int(11) NOT NULL AUTO_INCREMENT,
    id_product varchar(50) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT 'trx_wingo',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    fee float NOT NULL DEFAULT 0,
    get float NOT NULL DEFAULT 0,
    result varchar(10) NOT NULL DEFAULT '0',
    status int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- wingo_bet
CREATE TABLE wingo_bet (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- 5d_bet
CREATE TABLE `5d_bet` (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game int(11) NOT NULL DEFAULT 0,
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- k3_bet
CREATE TABLE k3_bet (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game int(11) NOT NULL DEFAULT 0,
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- minutes_1
CREATE TABLE minutes_1 (
    id int(11) NOT NULL AUTO_INCREMENT,
    id_product varchar(50) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    fee float NOT NULL DEFAULT 0,
    get float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    level int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- result_wingo
CREATE TABLE result_wingo (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    price float NOT NULL DEFAULT 0,
    amount float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    level int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- result_5d
CREATE TABLE result_5d (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    price float NOT NULL DEFAULT 0,
    amount float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    level int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- result_k3
CREATE TABLE result_k3 (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    game varchar(20) NOT NULL DEFAULT '0',
    period varchar(30) NOT NULL DEFAULT '0',
    bet varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    price float NOT NULL DEFAULT 0,
    typeGame varchar(20) NOT NULL DEFAULT '0',
    amount float NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    level int(11) NOT NULL DEFAULT 0,
    today datetime NOT NULL DEFAULT current_timestamp(),
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- transactions
CREATE TABLE transactions (
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    phone VARCHAR(15) NOT NULL,
    amount INT NOT NULL,
    transactionTypeId VARCHAR(80) NOT NULL,
    transferTypeId VARCHAR(80) NOT NULL,
    details VARCHAR(256) NOT NULL,
    status INT NOT NULL,
    time VARCHAR(30) NOT NULL,
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- claimed_rewards
CREATE TABLE claimed_rewards (
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    reward_id VARCHAR(50) NOT NULL DEFAULT '0',
    phone VARCHAR(15) NOT NULL,
    type VARCHAR(20) NOT NULL,
    amount INT NOT NULL,
    status INT NOT NULL,
    time VARCHAR(30) NOT NULL,
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- attendance_bonus
CREATE TABLE attendance_bonus (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    day int(11) NOT NULL DEFAULT 0,
    status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- invite
CREATE TABLE invite (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    invite varchar(30) NOT NULL DEFAULT '0',
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- user_bank
CREATE TABLE user_bank (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    name_bank varchar(100) NOT NULL DEFAULT '0',
    name_user varchar(100) NOT NULL DEFAULT '0',
    stk varchar(100) NOT NULL DEFAULT '0',
    tinh varchar(50) NOT NULL DEFAULT '0',
    chi_nhanh varchar(100) NOT NULL DEFAULT '0',
    sdt varchar(50) NOT NULL DEFAULT '0',
    tp varchar(20) NOT NULL DEFAULT 'bank',
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- commissions
CREATE TABLE commissions (
    id int(11) NOT NULL AUTO_INCREMENT,
    commission_id varchar(50) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    from_user_phone varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    level int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- redenvelopes
CREATE TABLE redenvelopes (
    id int(11) NOT NULL AUTO_INCREMENT,
    id_redenvelope varchar(50) NOT NULL DEFAULT '0',
    code varchar(50) NOT NULL DEFAULT '0',
    phone varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    used int(11) NOT NULL DEFAULT 0,
    amount int(11) NOT NULL DEFAULT 1,
    status int(11) NOT NULL DEFAULT 0,
    for_new_users int(11) NOT NULL DEFAULT 0,
    expire_date varchar(50) NOT NULL DEFAULT '0',
    phone_used varchar(20) NOT NULL DEFAULT '0',
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- redenvelopes_used
CREATE TABLE redenvelopes_used (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    code varchar(50) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- vip_level
CREATE TABLE vip_level (
    id int(11) NOT NULL AUTO_INCREMENT,
    level int(11) NOT NULL DEFAULT 0,
    min_bet float NOT NULL DEFAULT 0,
    max_bet float NOT NULL DEFAULT 0,
    bonus float NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- point_list
CREATE TABLE point_list (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    level int(11) NOT NULL DEFAULT 0,
    money float NOT NULL DEFAULT 0,
    money_us float NOT NULL DEFAULT 0,
    total1 float NOT NULL DEFAULT 0,
    total2 float NOT NULL DEFAULT 0,
    total3 float NOT NULL DEFAULT 0,
    total4 float NOT NULL DEFAULT 0,
    total5 float NOT NULL DEFAULT 0,
    total6 float NOT NULL DEFAULT 0,
    total7 float NOT NULL DEFAULT 0,
    telegram varchar(100) NOT NULL DEFAULT '0',
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- financial_details
CREATE TABLE financial_details (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    money float NOT NULL DEFAULT 0,
    type varchar(50) NOT NULL DEFAULT '0',
    status int(11) NOT NULL DEFAULT 0,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- salary
CREATE TABLE salary (
    id int(11) NOT NULL AUTO_INCREMENT,
    phone varchar(20) NOT NULL DEFAULT '0',
    amount float NOT NULL DEFAULT 0,
    type varchar(50) NOT NULL DEFAULT '0',
    status int(11) NOT NULL DEFAULT 1,
    time varchar(50) NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

