

-- auto-generated definition
create table lrlz_merchant
(
    mchid           int auto_increment
        primary key,
    name            varchar(128)                null,
    admin_id        int              default 0  null,
    password        char(32)         default '' null,
    last_login_ip   varchar(64)      default '' null,
    last_login_time int(11) unsigned default 0  null,
    ip_white_list   varchar(1024)    default '' null,
    secure_key      varchar(64)      default '' null
)
    comment 'ToB 合作表' charset = utf8mb4;

create table lrlz_merchant_price
(
    mprice_id  int auto_increment
        primary key,
    mchid      int                         not null,
    card_types varchar(32)    default '1'  null comment '充值类型,以，号分隔开',
    spec       decimal(10, 2) default 0.00 null,
    price      decimal(10, 2) default 0.00 null
);

-- auto-generated definition
create table lrlz_refill_order
(
    order_id         int                         not null
        primary key,
    order_sn         bigint                      null,
    mchid            int                         null,
    mch_order        varchar(32)                 null,
    refill_amount    decimal(10, 2) default 0.00 null,
    card_type        tinyint                     null,
    card_no          bigint                      null,
    idcard           varchar(32) charset latin1  null,
    card_name        varchar(32)                 null,
    notify_url       varchar(256) charset latin1 null,
    channel_name     varchar(32) charset latin1  null,
    mch_amount       decimal(10, 2)              null comment '充值机构花了多少钱',
    channel_amount   decimal(10, 2)              null comment '通道扣了多少钱',
    ch_trade_no      varchar(48) charset latin1  null,
    order_time       int                         null,
    commit_time      int                         null,
    notify_time      int                         null,
    notify_state     tinyint        default 0    null,
    mch_notify_state tinyint        default 0    null,
    mch_notify_times int            default 0    null
)
    charset = utf8mb4;





