/* 用户视图：医生、患者、用户微信状态*/
create or replace view doctors as 
select code id, name, sex, birthday birthdate, photo avatar, level
from wlyy.wlyy_doctor;

create or replace view patients as 
select code id, name, sex, birthday birthdate, photo avatar, openid
from wlyy.wlyy_patient;

create or replace view wechat_status as
select code user_id, openid open_id
from wlyy.wlyy_patient
;

/*三师后台咨询消息ID字段类型修改*/
ALTER TABLE wlyy.wlyy_consult_team
  MODIFY COLUMN `end_msg_id`  varchar(50) NULL DEFAULT NULL AFTER `guidance`,
  MODIFY COLUMN `start_msg_id`  varchar(50) NULL DEFAULT NULL AFTER `end_msg_id`;