create table promotion_grant_account
(
    id                   varchar(64)   not null
        primary key,
    name                 varchar(255)  null,
    company              varchar(64)   not null,
    app_id               varchar(64)   null,
    account_type         varchar(64)   null,
    user_id              varchar(64)   null,
    open_id              varchar(64)   null,
    account_id           varchar(64)   null,
    scope                varchar(255)  null,
    access_token         varchar(1000) null,
    expires_time         datetime      null,
    refresh_token        varchar(1000) null,
    refresh_expires_time datetime      null,
    auth_time            datetime      null,
    create_time          datetime      not null,
    update_time          datetime      not null,
    status               int default 0 not null
);

create table promotion_grant_app
(
    id          varchar(64)   not null
        primary key,
    name        varchar(255)  null,
    company     varchar(64)   not null,
    subject     varchar(255)  null,
    app_secret  varchar(255)  null,
    create_time datetime      not null,
    update_time datetime      not null,
    status      int default 0 not null
);

