syntax = "proto3";

package com.ywt.gapi.activity;

option java_generic_services = true;
option java_multiple_files = true;
option java_package = "com.ywt.gapi.activity";
option go_package = "/activity";

//活动
message Activity {
	int32 activityId = 1;
    string title = 2;
	int64 createTime = 3;
    string description = 4;
    string url = 5;
    int64 startTime = 6;
    int64 endTime = 7;
    int32 type = 8;
    string data = 9;
}

//咨询活动
message ConsultingActivity {
	int32 activityId = 1;	//活动ID
    string title = 2;		//活动名称
	int64 createTime = 3;	//活动创建时间
    string description = 4;	//描述
    string url = 5;			//页面跳转地址
    int64 startTime = 6;	//开始时间
    int64 endTime = 7;		//结束时间
    int32 type = 8;			//类型
    int32 total = 9;		//总人数
	int32 amount = 10;		//金额
	int32 status = 11;		//0-活动未开始 1-活动进行中	2-活动已结束  
	string hospitalIds = 12;//参与活动的医院
	string hospitalNames = 13;
	int32 remain = 14;		//剩余名额
	string banner = 15;		//广告图
}

//获取问卷列表请求
message GetConsultingActivityRequest{
	int32 userId = 1;
}

//获取问卷列表响应
message GetConsultingActivityResponse{
	int32 code = 1;
	string msg = 2;
	ConsultingActivity activity = 3;
	int32 participation = 4;	//是否参与过 0-否 1-是
}
// 对应 rpc 项目的 ActivityServiceImpl 类
service ActivityService{
	//获取咨询活动
	rpc getConsultingActivity(GetConsultingActivityRequest) returns (GetConsultingActivityResponse);
}