
-- 素材
create table wx_service.mp_material
(
    id                           int UNSIGNED         auto_increment comment '主键ID',
    media_id                     varchar(255)         comment '上传公众号返回的ID',
    file_name                    varchar(255)         comment '文件名',
    file_size                    BIGINT(20)           comment '文件大小',
    file_path                    varchar(255)         comment '文件目录',
    file_type                    varchar(127)         comment '文件类型',
    creator_id                   bigint               comment '创建人',
    create_time                  varchar(22)          comment '创建时间',
    moder_id                     bigint               comment '修改人',
    mod_time                     varchar(22)          comment '修改时间',
    tstm                         timestamp on update CURRENT_TIMESTAMP    comment '时间戳',
    constraint material_pk  primary key (id),
    constraint material_pk  unique (file_name)
)
    ENGINE=INNODB DEFAULT CHARSET=utf8 comment '公众号永久素材';

--关注自动回复图文消息
create table wx_service.mp_subscribe_item
(
    id                           int UNSIGNED         auto_increment comment '主键ID',
    wechat_account               varchar(255)         comment '公众号账号',
    title                        varchar(255)         comment '标题',
    description                  varchar(255)         comment '描述',
    pic_url                      varchar(255)         comment '图片链接',
    url                          varchar(255)         comment '图文跳转链接',
    creator_id                   bigint               comment '创建人',
    create_time                  varchar(22)          comment '创建时间',
    moder_id                     bigint               comment '修改人',
    mod_time                     varchar(22)          comment '修改时间',
    tstm                         timestamp on update CURRENT_TIMESTAMP    comment '时间戳',
    constraint material_pk  primary key (id),
    constraint material_pk  unique (wechat_account)
)
    ENGINE=INNODB DEFAULT CHARSET=utf8 comment '关注自动回复图文消息';

insert into wx_service.mp_subscribe_item (wechat_account,title,description,pic_url,url,create_time,mod_time,tstm)
values ('qhemato','欢迎关注【e码头】','【e码头跨境电商新零售】\n>>>门店购买的订单,点击绑定手机号,立即取件!','https://wxservice.fu-qing.com/images/emtnew.png',
'https://wxservice.fu-qing.com/view/binding?openid=','2023-08-18 15:15:01','2023-08-18 15:15:01','2023-08-18 15:15:01');