syntax = "proto3"; package water; option go_package="./water"; import "google/api/annotations.proto"; message WifiCheckRequest { string host_code = 1; } message WifiSetRequest { string host_code = 1; } message HostCodeRequest { string host_code = 1; } message LogItemsRequest { int32 page = 1; int32 size = 2; repeated string time = 3; string host_code = 4; } message AddLogRequest { string host_code = 1; string time = 2; int64 salt = 3; int64 water = 4; } message Response { int32 code = 1; string msg = 2; string data = 3; } message EmptyRequest { } message AddWarningRequest { string host_code = 1; string time = 2; int32 type = 3; string content = 4; } message GetWarningItemsRequest { int32 page = 1; int32 size = 2; string host_code = 3; int32 type = 4; } message WarningStatusRequest { int64 id = 1; int32 status = 2; } message changeAdminRequest { string host_code = 1; int64 user_id = 2; } message UsersRequest { string host_code = 1; } message ApplyUserRequest { string host_code = 1; int64 user_id = 2; } message ApplyStatusRequest { int64 id = 1; int32 status = 2; } message SettingRequest { string host_code = 1; int32 salt_percent =2; int32 hardness = 3; string refresh_time = 4; int32 use_number = 5; int32 soften = 6; string no_disturbing = 7; } service Water { rpc WifiCheck(WifiCheckRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/wifi/check" body: "*" }; } rpc WifiSet(WifiSetRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/wifi/set" body: "*" }; } rpc AddLog(AddLogRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/add/log" body: "*" }; } rpc LogItems(LogItemsRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/log/items" body: "*" }; } rpc Setting(SettingRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/setting" body: "*" }; } rpc GetSetting(HostCodeRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/get/setting" body: "*" }; } // 获取月,日量 rpc GetWaterInfo(EmptyRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/info" body: "*" }; } // 获取 流量计 液位计 侵水计 超声 四种设备异常警告 rpc GetWarning(GetWarningItemsRequest) returns (Response) { option (google.api.http) = { get: "/api/v3/water/warning" body: "*" }; } // 添加 流量计 液位计 侵水计 超声 四种设备异常警 rpc AddWarning(AddWarningRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/warning/add" body: "*" }; } // 状态 rpc WarningStatus(WarningStatusRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/warning/status" body: "*" }; } // 申请 rpc ApplyUser(ApplyUserRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/apply" body: "*" }; } // 同意 rpc ApplyStatus(ApplyStatusRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/apply/status" body: "*" }; } // 转移管理人 rpc changeAdmin(changeAdminRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/change/admin" body: "*" }; } // 管理人列表 rpc Users(UsersRequest) returns (Response) { option (google.api.http) = { post: "/api/v3/water/users" body: "*" }; } }