Files
yunzerwebsiteallinone/go/docs/sql/create_wechat_mini_config.sql
T
2026-11-16 17:22:50 +08:00

20 lines
1.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
CREATE TABLE IF NOT EXISTS `yz_platform_wechat_mini_config` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '小程序 AppID',
`app_secret` VARCHAR(512) NOT NULL DEFAULT '' COMMENT '小程序 AppSecret(AES 密文,不回显)',
`enabled` TINYINT NOT NULL DEFAULT 0 COMMENT '是否启用小程序登录:0否 1是',
`auto_bind` TINYINT NOT NULL DEFAULT 1 COMMENT '手机号验证通过后是否自动绑定小程序:0否 1是',
`remark` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '备注',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信小程序配置';
INSERT INTO `yz_auth_client`
(`client_id`, `app_code`, `name`, `app_type`, `grant_types`, `scope`, `access_ttl`, `refresh_ttl`, `realm`)
VALUES
('yz-miniapp', 'miniapp', '微信小程序', 4, 'authorization_code,refresh_token', 'openid,profile,tenant', 1800, 2592000, 'tenant')
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`);