123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- 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{
- }
|