466 lines
9.6 KiB
Protocol Buffer
466 lines
9.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package equipment;
|
|
option go_package="./equipment";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message CreateRequest {
|
|
string hardware_version =1;
|
|
string version =2;
|
|
string firmware_src =3;
|
|
string describe =4;
|
|
int32 type =5;
|
|
string soft_src =6;
|
|
string add_src =7;
|
|
string soft_config =8;
|
|
}
|
|
|
|
message EditRequest {
|
|
int64 id = 1;
|
|
string hardware_version =2;
|
|
string version =3;
|
|
string firmware_src =4;
|
|
string describe =5;
|
|
int32 type =6;
|
|
string soft_src =7;
|
|
string add_src =8;
|
|
string soft_config =9;
|
|
}
|
|
|
|
message ItemsRequest {
|
|
int32 page = 1;
|
|
int32 size =2;
|
|
int32 type =3;
|
|
}
|
|
|
|
message IdRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message IdStringRequest {
|
|
string mask_id = 1;
|
|
}
|
|
|
|
message StoreIdStringRequest {
|
|
string mask_id = 1;
|
|
int64 user_id = 2;
|
|
}
|
|
|
|
message StatusRequest {
|
|
int64 id = 1;
|
|
int32 status = 2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message MaskItemsRequest {
|
|
int32 page = 1;
|
|
int32 size =2;
|
|
int32 type =3;
|
|
string facial_mask_id = 4;
|
|
int32 is_on_trial = 5;
|
|
int32 model = 6;
|
|
int32 worker_group_id = 7;
|
|
string batch = 8;
|
|
int32 is_store = 9;
|
|
int32 use_scenario = 10;
|
|
int32 effect = 11;
|
|
repeated string time = 12;
|
|
int32 is_use = 13;
|
|
}
|
|
|
|
message BeansItemsRequest {
|
|
int32 page = 1;
|
|
int32 size =2;
|
|
string name = 3;
|
|
repeated string time = 4;
|
|
}
|
|
|
|
message ApiBindAddRequest {
|
|
string host_nickname = 1;
|
|
string host_code = 2;
|
|
int32 type = 3;
|
|
}
|
|
|
|
message InternalBindAddRequest {
|
|
int64 user_id = 1;
|
|
string user_nickname = 2;
|
|
string host_nickname = 3;
|
|
string host_code = 4;
|
|
int32 type = 5;
|
|
int32 skin_type = 6;
|
|
}
|
|
|
|
message InternalBindInfoRequest {
|
|
int64 user_id = 1;
|
|
int32 skin_type = 2;
|
|
string host_code = 3;
|
|
int32 type = 4;
|
|
int64 id = 5;
|
|
}
|
|
|
|
message ApiBindInfoRequest {
|
|
int64 id = 1;
|
|
string host_code = 2;
|
|
int32 type = 3;
|
|
}
|
|
|
|
message ApiBindUpdateRequest {
|
|
int64 id = 1;
|
|
string host_nickname = 2;
|
|
}
|
|
|
|
message ApiEditNameRequest {
|
|
string host_code = 1;
|
|
string host_nickname = 2;
|
|
int32 type = 3;
|
|
}
|
|
|
|
message AuthorizationBindRequest {
|
|
int64 store_id = 1;
|
|
string code = 2;
|
|
}
|
|
|
|
message AuthorizationCancelRequest {
|
|
int64 store_id = 1;
|
|
}
|
|
|
|
message AuthorizationControlRequest {
|
|
int64 store_id = 1;
|
|
int32 open = 2;
|
|
}
|
|
|
|
message ApiUnBindRequest {
|
|
string host_code = 1;
|
|
int32 type = 2;
|
|
}
|
|
|
|
message EmptyRequest {
|
|
|
|
}
|
|
|
|
message ApiBindExpiryRequest {
|
|
string host_code = 1;
|
|
int32 type = 2;
|
|
int32 equipment_type = 3;
|
|
}
|
|
message ApiBindExpiryGetRequest {
|
|
string host_code = 1;
|
|
int32 type = 2;
|
|
}
|
|
message ApiBeansItemsRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
}
|
|
message ApiBeansAddRequest {
|
|
string image = 1;
|
|
int64 id = 2;
|
|
}
|
|
message ApiMaskAddRequest {
|
|
string facial_mask_id = 1;
|
|
string produce_time = 2;
|
|
int64 quality_guarantee_period= 3;
|
|
int32 is_on_trial = 4;
|
|
string model = 5;
|
|
string batch = 6;
|
|
int32 is_store = 7;
|
|
int32 is_online = 8;
|
|
int64 model_id = 9;
|
|
int32 use_scenario = 10;
|
|
int64 effect = 11;
|
|
int64 worker_group_id = 12;
|
|
}
|
|
|
|
message ApiMaskUseRequest {
|
|
string facial_mask_id = 1;
|
|
string use_time = 2;
|
|
string host_code = 3;
|
|
string gear_position = 4;
|
|
string voltage = 5;
|
|
string electric_current = 6;
|
|
string efficiency = 7;
|
|
string resistance = 8;
|
|
string score = 9;
|
|
int64 store_id = 10;
|
|
int64 user_id = 11;
|
|
}
|
|
message ApiMaskUsedItemsRequest {
|
|
string facial_mask_id = 1;
|
|
string use_time = 2;
|
|
string host_code = 3;
|
|
}
|
|
|
|
message BindExpiryRequest {
|
|
int64 id =1;
|
|
string expiry =2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message InternalUserInfoRequest {
|
|
int64 user_id = 1;
|
|
int32 number = 2;
|
|
}
|
|
|
|
message InternalResponse {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message SetExpiryRequest {
|
|
int64 id =1;
|
|
string expiry =2;
|
|
string reason = 3;
|
|
}
|
|
|
|
message UserBindRequest {
|
|
int64 id =1;
|
|
}
|
|
|
|
message ApiVersionRequest {
|
|
int32 type = 1;
|
|
string version = 2;
|
|
}
|
|
|
|
service Equipment {
|
|
rpc Items(ItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/version/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Info(IdRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/version/info"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Create(CreateRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/version/create"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Edit(EditRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/version/edit"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc Status(StatusRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/version/status"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc MaskItems(MaskItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/mask/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc BeansItems(BeansItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/beans/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc BindExpiry(BindExpiryRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/device/expiry"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc UserBind(UserBindRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/user/bind"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
|
|
/*******************API*************************/
|
|
rpc ApiMaskAdd(ApiMaskAddRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/mask/add"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiBindItems(EmptyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiUnBind(ApiUnBindRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/unbind"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiBindAdd(ApiBindAddRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/bind"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiBindExpiry(ApiBindExpiryRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/expiry"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiBindExpiryGet(ApiBindExpiryGetRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/expiry/get"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiBeansAdd(ApiBeansAddRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/beans/add"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiBeansLast(EmptyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/beans/last"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiBeansItems(ApiBeansItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/beans/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiMaskUse(ApiMaskUseRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/mask/use"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiMaskUsedItems(ApiMaskUsedItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/mask/used/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiMaskStoreUse(ApiMaskUseRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/mask/store/use"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiMaskStoreUseItems(ApiMaskUsedItemsRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/mask/store/used/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiVersion(ApiVersionRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
get: "/api/v3/equipment/version"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiBindInfo(ApiBindInfoRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/info"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiBindUpdate(ApiBindUpdateRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/update"
|
|
body: "*"
|
|
};
|
|
};
|
|
rpc ApiCheckMask(IdStringRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/check/mask"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiEditName(ApiEditNameRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/edit/name"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
//授权绑定
|
|
rpc AuthorizationBind(AuthorizationBindRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/bind"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
// 解绑授权
|
|
rpc AuthorizationCancel(AuthorizationCancelRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/cancel"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
// 更改打开权限开关
|
|
rpc AuthorizationControl(AuthorizationControlRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/control"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
// 用户端获取授权列表
|
|
rpc AuthorizationItems(EmptyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
// 门店端获取授权列表
|
|
rpc AuthorizationStoreItems(EmptyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/store/items"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc ApiStoreCheckMask(StoreIdStringRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/store/check/mask"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc AuthorizationCode(EmptyRequest) returns(Response){
|
|
option (google.api.http) = {
|
|
post: "/api/v3/device/authorization/code"
|
|
body: "*"
|
|
};
|
|
};
|
|
|
|
rpc InternalBindAdd(InternalBindAddRequest) returns(Response);
|
|
rpc InternalBindInfo(InternalBindInfoRequest) returns(Response);
|
|
|
|
// 添加用户信息
|
|
rpc InternalUserAdd(InternalUserInfoRequest) returns(InternalResponse);
|
|
// 更新数量
|
|
rpc InternalUserEditNumber(InternalUserInfoRequest) returns(InternalResponse);
|
|
} |