CategoriesServiceProtoRpc.proto
5.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.infoloop.tianting";
option java_outer_classname = "CategoriesServiceProto";
option objc_class_prefix = "OP";
package com.infoloop.tianting;
service CategoriesServiceProtoRpc {
rpc GetCategoriesById (GetCategoriesServiceByIdRpcRequest) returns (GetCategoriesServiceByIdRpcResponse) {}
rpc GetCategoriesByIds (GetCategoriesServiceByIdsRpcRequest) returns (GetCategoriesServiceByIdsRpcResponse) {}
rpc QueryCategoriesByCondition (QueryCategoriesServiceByConditionRpcRequest) returns (QueryCategoriesServiceByConditionRpcResponse) {}
rpc CreateCategories (CreateCategoriesServiceRpcRequest) returns (CreateCategoriesServiceRpcResponse) {}
rpc BatchCreateCategories (BatchCreateCategoriesServiceRpcRequest) returns (BatchCreateCategoriesServiceRpcResponse) {}
rpc UpdateCategories (UpdateCategoriesServiceRpcRequest) returns (UpdateCategoriesServiceRpcResponse) {}
rpc BatchUpdateCategories (BatchUpdateCategoriesServiceRpcRequest) returns (BatchUpdateCategoriesServiceRpcResponse) {}
rpc DeleteCategoriesByIds (DeleteCategoriesServiceByIdsRpcRequest) returns (DeleteCategoriesServiceRpcResponse) {}
// 查询品类
rpc QueryCategoriesAll (QueryCategoriesServiceAllRpcRequest) returns (QueryCategoriesServiceAllRpcResponse) {}
}
message QueryCategoriesServiceAllRpcRequest {
int32 enterpriseId = 1;
}
message QueryCategoriesServiceAllRpcResponse {
repeated SingleCategoriesAllRpcResponse responses = 1;
}
message SingleCategoriesResponse {
int32 id = 1;
int32 enterpriseId = 2;
int32 parentId = 3;
string code = 4;
string name = 5;
int32 status = 6;
int32 standardCategoryId = 7;
int64 createdAt = 8;
int64 updatedAt = 9;
bool isDeleted = 10;
int64 deletedAt = 11;
bool isBOM = 12;
bool isImageSet = 13;
string image = 14;
int32 sourceType = 15;
int32 sourceId = 16;
}
message GetCategoriesServiceByIdRpcRequest {
int32 id = 1;
int32 enterpriseId = 2;
bool includeDeleted = 3;
}
message GetCategoriesServiceByIdRpcResponse {
SingleCategoriesServiceRpcResponse response = 1;
}
message SingleCategoriesAllRpcResponse {
int32 id = 1;
int32 enterpriseId = 2;
string code = 3;
string name = 4;
int64 createdAt = 5;
int64 updatedAt = 6;
}
message SingleCategoriesServiceRpcResponse {
int32 id = 1;
int32 enterpriseId = 2;
string code = 3;
string name = 4;
int32 parentId = 5;
int32 status = 6;
int32 standardCategoryId = 7;
int64 createdAt = 8;
int64 updatedAt = 9;
bool isDeleted = 10;
int64 deletedAt = 11;
bool isBOM = 12;
bool isImageSet = 13;
string image = 14;
int32 sourceType = 15;
int32 sourceId = 16;
}
message GetCategoriesServiceByIdsRpcRequest {
repeated int32 ids = 1;
int32 enterpriseId = 2;
bool includeDeleted = 3;
}
message GetCategoriesServiceByIdsRpcResponse {
repeated SingleCategoriesServiceRpcResponse responses = 1;
}
message QueryCategoriesServiceByConditionRpcRequest {
int32 enterpriseId = 1;
bool shouldFilterDish = 2;
string dish = 3;
bool includeDeleted = 4;
bool shouldFilterFlag = 5;
bool shouldFilterCode = 6;
string code = 7;
bool shouldFilterName = 8;
string name = 9;
DishCategoriesType type = 10;
}
message QueryCategoriesServiceByConditionRpcResponse {
repeated SingleCategoriesServiceRpcResponse responses = 1;
}
message CreateCategoriesServiceRpcRequest {
CategoriesServiceCreation creation = 1;
int32 enterpriseId = 2;
int32 createdBy = 3;
int32 creationSource = 4;
}
message CategoriesServiceCreation{
string code = 1;
string name = 2;
int32 parentId = 3;
int32 status = 4;
int32 standardCategoryId = 5;
int64 createdAt = 6;
int64 updatedAt = 7;
bool isDeleted = 8;
int64 deletedAt = 9;
bool isBOM = 10;
bool isImageSet = 11;
string image = 12;
int32 sourceType = 13;
int32 sourceId = 14;
int32 createdBy = 15;
}
enum DishCategoriesType{
UNKNOWN_CATEGORIES_TYPE = 0;
DISH_CATEGORIES_TYPE = 1; // 菜品品类
}
message CreateCategoriesServiceRpcResponse {
int32 id = 1;
bool isCreated = 2;
}
message BatchCreateCategoriesServiceRpcRequest {
repeated CategoriesServiceCreation creations = 1;
int32 enterpriseId = 2;
int32 createdBy = 3;
int32 creationSource = 4;
}
message BatchCreateCategoriesServiceRpcResponse {
repeated int32 ids = 1;
bool isCreated = 2;
}
message UpdateCategoriesServiceRpcRequest {
CategoriesServiceModification modification = 1;
int32 enterpriseId = 2;
int32 updatedBy = 3;
int32 updateSource = 4;
}
message CategoriesServiceModification {
int32 id = 1;
bool shouldFilterName = 2;
string name = 3;
int32 parentId = 4;
bool shouldFilterParentId = 5;
DishCategoriesStatus status = 6;
bool shouldFilterStatus = 7;
}
enum DishCategoriesStatus{
UNKNOWN_CATEGORIES_STATUS = 0;
ENABLE_CATEGORIES_STATUS = 1; // 启用
DEACTIVATE_CATEGORIES_STATUS = 3; //停用
}
message UpdateCategoriesServiceRpcResponse {
bool isUpdated = 1;
}
message BatchUpdateCategoriesServiceRpcRequest {
repeated CategoriesServiceModification modifications = 1;
int32 enterpriseId = 2;
int32 updatedBy = 3;
int32 updateSource = 4;
}
message BatchUpdateCategoriesServiceRpcResponse {
bool isUpdated = 1;
}
message DeleteCategoriesServiceByIdsRpcRequest {
repeated int32 ids = 1;
int32 enterpriseId = 2;
int32 updatedBy = 3;
int32 updateSource = 4;
}
message DeleteCategoriesServiceRpcResponse {
bool isDeleted = 1;
}