“mitao”
2026-04-07 a013b0c9d580b0a10200bfc60d1ea3af15e45740
tcm-training-admin-backend/sql/init.sql
@@ -272,6 +272,7 @@
  `district_name` VARCHAR(64) DEFAULT NULL COMMENT '区名称',
  `address` VARCHAR(255) DEFAULT NULL COMMENT '诊所地址',
  `business_license_url` VARCHAR(255) DEFAULT NULL COMMENT '营业执照图片',
  `invite_code` VARCHAR(16) DEFAULT NULL COMMENT '邀请码',
  `status` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '状态:1启用 0禁用',
  `deleted` TINYINT(1) NOT NULL DEFAULT 0,
  `created_by` VARCHAR(64) NOT NULL DEFAULT '系统初始化' COMMENT '创建人',
@@ -279,11 +280,12 @@
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_clinic_invite_code` (`invite_code`),
  KEY `idx_clinic_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='诊所表';
INSERT IGNORE INTO `tcm_clinic` (`id`, `name`, `contact_name`, `contact_phone`, `province_code`, `province_name`, `city_code`, `city_name`, `district_code`, `district_name`, `address`, `business_license_url`, `status`, `deleted`)
VALUES (1, '王太室堂中医', '王顾', '14725836901', '510000', '四川省', '510100', '成都市', '510106', '金牛区', '四川省成都市金牛区XXXXXXX', 'https://example.com/license/clinic-1.png', 1, 0);
INSERT IGNORE INTO `tcm_clinic` (`id`, `name`, `contact_name`, `contact_phone`, `province_code`, `province_name`, `city_code`, `city_name`, `district_code`, `district_name`, `address`, `business_license_url`, `invite_code`, `status`, `deleted`)
VALUES (1, '王太室堂中医', '王顾', '14725836901', '510000', '四川省', '510100', '成都市', '510106', '金牛区', '四川省成都市金牛区XXXXXXX', 'https://example.com/license/clinic-1.png', 'ABC123', 1, 0);
-- ----------------------------
-- 用户:学员(C端用户)
@@ -304,6 +306,7 @@
  `intro` VARCHAR(500) DEFAULT NULL COMMENT '个人介绍',
  `status` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '状态:1启用 0禁用',
  `clinic_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '绑定诊所ID(type=1时有值)',
  `superior_clinic_user_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '上级诊所用户ID',
  `member_expire_at` DATETIME DEFAULT NULL COMMENT '会员有效期(NULL=非会员,有值且未过期=会员)',
  `deleted` TINYINT(1) NOT NULL DEFAULT 0,
  `created_by` VARCHAR(64) NOT NULL DEFAULT '系统初始化' COMMENT '创建人',
@@ -316,8 +319,8 @@
  KEY `idx_app_user_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='APP用户表(C端用户)';
INSERT IGNORE INTO `tcm_app_user` (`id`, `nickname`, `phone`, `password`, `avatar`, `wechat_openid`, `wechat_nickname`, `wechat_avatar`, `wechat_bound_at`, `type`, `gender`, `age`, `intro`, `status`, `clinic_id`, `member_expire_at`, `deleted`)
VALUES (200, '张三', '13800008888', NULL, 'https://example.com/avatar/app-user-200.png', 'wx_openid_200', '小张', 'https://example.com/avatar/wechat-200.png', CURRENT_TIMESTAMP, 1, 1, 19, 'If you find an element of your interface requires instructions, then you need to redesign it.', 1, 1, NULL, 0);
INSERT IGNORE INTO `tcm_app_user` (`id`, `nickname`, `phone`, `password`, `avatar`, `wechat_openid`, `wechat_nickname`, `wechat_avatar`, `wechat_bound_at`, `type`, `gender`, `age`, `intro`, `status`, `clinic_id`, `superior_clinic_user_id`, `member_expire_at`, `deleted`)
VALUES (200, '张三', '13800008888', NULL, 'https://example.com/avatar/app-user-200.png', 'wx_openid_200', '小张', 'https://example.com/avatar/wechat-200.png', CURRENT_TIMESTAMP, 1, 1, 19, 'If you find an element of your interface requires instructions, then you need to redesign it.', 1, 1, NULL, NULL, 0);
-- ----------------------------
-- 会员价格配置