create table gpt.prop_log
(
    id          bigint auto_increment
        primary key,
    ssid        varchar(64)   not null,
    func_type   varchar(255)  not null,
    prop_id     varchar(64)   not null,
    amount      int           not null,
    create_time datetime      not null,
    update_time datetime      not null,
    status      int default 0 not null
);

create index ssid_index
    on gpt.prop_log (ssid);

create table gpt.redpack_message
(
    content varchar(255) not null
);

create table gpt.user_info
(
    ssid           varchar(64)   not null
        primary key,
    uid            bigint        null comment 'ssid的hashCode 仅展示',
    alipay_user_id varchar(128)  null,
    alipay_id_type varchar(128)  null,
    wechat_openid  varchar(128)  null,
    nickname       varchar(255)  null,
    head_img_url   varchar(255)  null,
    create_time    datetime      not null,
    update_time    datetime      not null,
    status         int default 0 not null
);

create table gpt.virtual_user_info
(
    user_name      varchar(255) not null,
    user_head_icon varchar(255) not null
);

create table gpt.withdraw_log
(
    id              bigint auto_increment
        primary key,
    ssid            varchar(64)   not null,
    device_id       varchar(64)   not null,
    pay_method      int           not null,
    pay_platform    int           not null,
    out_transfer_no varchar(64)   null,
    amount          bigint        not null,
    func_type       varchar(255)  not null,
    changed_props   varchar(1000) null comment 'json array',
    create_time     datetime      not null,
    update_time     datetime      not null,
    success_time    datetime      null,
    status          int default 0 not null
);

create index ssid_index
    on gpt.withdraw_log (ssid);

