yihaobao-proto/msg.proto
2025-06-17 10:08:15 +08:00

138 lines
2.2 KiB
Protocol Buffer

syntax = "proto3";
package ws;
option go_package = "./pb";
enum MsgType {
UNKNOWN = 0;
AUTH_CLIENT = 100;
UPLOAD_SYS_INFO = 101;
QUERY_PLAN = 102;
//通知
NOTIFY_CLIENT_UPDATE = 200;
// 插入任务
NOTIFY_CLIENT_INSERT_PLAN = 201;
//更新任务
NOTIFY_CLIENT_UPDATE_PLAN = 202;
}
message Msg {
MsgType type = 1;
bytes data = 2;
}
message Empty {}
// 下位机认证端请求
message AuthClientReq {
string token = 1;
}
message AuthClientResp {
string Name = 1;
}
// 上位机上传系统信息
message UploadSysInfoReq {
string Version = 1;
string Ip = 2;
string OsName = 3;
}
// 上位机查询计划
message QueryPlanReq {
string PlanId = 1;
}
message QueryQryUserInfo {
string UserId = 1;
string UserName = 2;
string Password = 3;
}
message QueryPlanUserInfo {
string UserId = 1;
string UserName = 2;
string Password = 3;
string TimePoints = 4;
}
enum PlanStatusType {
PLAN_STATUS_UNKNOWN = 0;
PLAN_STATUS_RUNNING = 2;
PLAN_STATUS_STOPPED = 3;
}
message DoctorInfo {
//医院名称
string HospitalName = 1;
//医院代码
string HospitalCode = 2;
//分院名称
string BranchName = 3;
//分院代码
string BranchCode = 4;
//科室名称
string DeptName = 5;
//科室代码
string DeptCode=6;
//医生姓名
string DoctorName = 7;
//医生代码
string DoctorCode = 8;
//医生职称
string DoctorTitle = 9;
//医生电话
string DoctorPhone = 10;
//医生费用
string DoctorFee = 11;
}
//预约信息
message AppointmentInfo {
//日期
string Date = 1;
//开始时间
string StartTime = 2;
//结束时间
string EndTime = 3;
}
// 患者信息
message PatientInfo {
//姓名
string Name = 1;
//性别
string Gender = 2;
// 手机号
string Telephone = 3;
// 身份证号
string IdCard = 4;
// ic卡号
string IcCard = 5;
// iC卡ID
string IcCardId = 6;
// 是否是军人
bool IsArmy = 7;
//预约时间段
AppointmentInfo Appointment = 8;
}
message PlanInfo {
string PlanId = 1;
string PlanName = 2;
string PlanDesc = 3;
PlanStatusType PlanStatus = 4;
string ExecTime = 5;//
//医生信息
DoctorInfo Doctor = 6;
//患者信息
repeated PatientInfo Patient = 7;
}