syntax = "proto3"; // package声明符,用来防止不同的消息类型有命名冲突 package v1; // 用于生成指定语言go的包名称 option go_package = "smart-site-management-gateway/pb/v1"; message AlarmListRequest{ string sn = 1; int32 page = 2; int64 project_id = 3; int64 start = 4; int64 end = 5; int32 page_size = 6; int32 filter = 7; int64 timestamp = 8; int32 device_code = 9; } message AlarmItem { string sn = 1; int64 project_id = 2; string reason = 3; bool is_handled = 4; string time = 5; string name = 6; string type_name = 7; int64 id = 8; } message AlarmListReply{ int64 total = 1; int32 page = 2; int32 page_size = 3; repeated AlarmItem list = 4; bool has_more = 5; int64 timestamp = 6; } message AlarmRule{ int64 project_id = 1; string sn = 2; int32 alarm_count = 3; int32 silence_period = 4; bool is_on = 5; int64 id = 6; int32 continue_period = 7; string project_name = 8; string device_name = 9; } message AlarmRuleAddRequest { int64 project_id = 1; string sn = 2; int32 alarm_count = 3; int32 silence_period = 4; bool is_on = 5; int32 continue_period = 7; } message AlarmRuleAddReply{ int64 id = 1; } message AlarmRuleListRequest{ int64 project_id = 1; string sn = 2; int32 page = 3; } message AlarmRuleListReply{ repeated AlarmRule list = 1; int32 page = 2; int64 total = 3; int32 page_size = 4; } message AlarmRuleDeleteRequest{ int64 id =1; } message AlarmRuleDeleteReply{ } message AlarmRuleOnOffRequest{ int64 id =1; bool is_on = 2; } message AlarmRuleOnOffReply{ } message AlarmRuleUpdateRequest{ AlarmRule rule = 1; } message AlarmRuleUpdateReply{ } message AlarmContact{ // id int64 id = 1; // 项目id int64 project_id = 2; // 告警联系人电话 string phone = 3; // 告警联系人邮件 string email = 4; } message AlarmContactAddRequest{ // 项目id int64 project_id = 1; // 告警联系人电话 string phone = 2; // 告警联系人邮件 string email = 3; } message AlarmContactAddReply{ int64 id = 1; } message AlarmContactListRequest{ // 项目id int64 project_id = 1; } message AlarmContactListReply{ repeated AlarmContact list = 1; } message AlarmContactDeleteRequest{ // 项目id int64 project_id = 1; // id int64 id = 2; } message AlarmContactDeleteReply{ } message AlarmContactUpdateRequest{ AlarmContact contact = 1; } message AlarmContactUpdateReply{ }