syntax = "proto3";

import "base.proto";

package com.ywt.gapi.system;

option java_generic_services = true;
option java_multiple_files = true;
option java_package = "com.ywt.gapi.system";

message Hospital{
	int32 hospitalId = 1;		//医院Id
	string hospitalName = 2;	//医院名称
	string areaIds = 3;			//地区Id
	int32 level = 4;			//医院等级
	string logo = 5;			//医院Logo
	string address = 6;			//详细地址
	int32 registerable = 7;	    //能否挂号
    int32 status = 8;           //状态(暂用于表示用户是否关注)
}

message Dept{
	int32 deptId = 1;
	string deptName = 2;
	string deptCode = 3;
	string yiDaCode = 4;	//医达科室code
	int32 parentId = 5;
}

message HospitalDept{
	int32 deptId = 1;
	string deptName = 2;
	repeated Dept deptList = 3;
	string deptCode = 4;
}

message HospitalListRequest{
	int32 pageIndex = 1;
	int32 pageSize = 2;	
}

message HospitalListResponse{
	Result result = 1;
	repeated Hospital hospitalList = 2;
	int32 count = 3;
    int32 totalPages = 4;
}

//地区
message Area{
	int32 id = 1; 			//唯一标识
	string name = 2;		//名称
	int32 weight = 3;		//权重
	int32 status = 4;		//状态
	int32 parentId = 5;		//上级Id
	int32 display = 6;		//显示
	int32 level = 7;		//地区级别
}


//获取地区列表请求--APP专用
message AreaListRequest{

}
//获取地区列表响应--APP专用
message AreaListResponse{
	Result result = 1;
	repeated Area area = 2;	//地区列表
}


// 对应 rpc 项目的 SystemServiceImpl 类
service SystemService{
	rpc getHospitalList(HospitalListRequest) returns (HospitalListResponse);	//获取医院列表
	rpc getAppAreaList(AreaListRequest) returns (AreaListResponse);	//获取地区
}
