update edit node

This commit is contained in:
2025-12-13 20:35:18 +07:00
parent 48e7adace0
commit 3b182d7380
11 changed files with 208 additions and 355 deletions
+33 -33
View File
@@ -1356,7 +1356,8 @@ func (x *GetGraphRsp) GetCountEdges() int32 {
type UpdateNodeReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Node *GraphNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Node *GraphNode `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1391,6 +1392,13 @@ func (*UpdateNodeReq) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{29}
}
func (x *UpdateNodeReq) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *UpdateNodeReq) GetNode() *GraphNode {
if x != nil {
return x.Node
@@ -1436,11 +1444,10 @@ func (*UpdateNodeRsp) Descriptor() ([]byte, []int) {
type GraphNode struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
Applications []*GraphApplication `protobuf:"bytes,5,rep,name=applications,proto3" json:"applications,omitempty"`
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
Applications []*GraphApplication `protobuf:"bytes,4,rep,name=applications,proto3" json:"applications,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1475,16 +1482,9 @@ func (*GraphNode) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{31}
}
func (x *GraphNode) GetId() int32 {
func (x *GraphNode) GetCode() string {
if x != nil {
return x.Id
}
return 0
}
func (x *GraphNode) GetLabel() string {
if x != nil {
return x.Label
return x.Code
}
return ""
}
@@ -1556,8 +1556,8 @@ func (x *GraphApplication) GetName() string {
type GetGraphRsp_Edge struct {
state protoimpl.MessageState `protogen:"open.v1"`
From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
Arrows string `protobuf:"bytes,3,opt,name=arrows,proto3" json:"arrows,omitempty"`
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -1594,18 +1594,18 @@ func (*GetGraphRsp_Edge) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{28, 0}
}
func (x *GetGraphRsp_Edge) GetFrom() int32 {
func (x *GetGraphRsp_Edge) GetFrom() string {
if x != nil {
return x.From
}
return 0
return ""
}
func (x *GetGraphRsp_Edge) GetTo() int32 {
func (x *GetGraphRsp_Edge) GetTo() string {
if x != nil {
return x.To
}
return 0
return ""
}
func (x *GetGraphRsp_Edge) GetArrows() string {
@@ -1702,19 +1702,19 @@ const file_main_proto_rawDesc = "" +
"countEdges\x18\x04 \x01(\x05R\n" +
"countEdges\x1aV\n" +
"\x04Edge\x12\x12\n" +
"\x04from\x18\x01 \x01(\x05R\x04from\x12\x0e\n" +
"\x02to\x18\x02 \x01(\x05R\x02to\x12\x16\n" +
"\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" +
"\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n" +
"\x06arrows\x18\x03 \x01(\tR\x06arrows\x12\x12\n" +
"\x04type\x18\x04 \x01(\tR\x04type\"G\n" +
"\rUpdateNodeReq\x126\n" +
"\x04node\x18\x01 \x01(\v2\".crabs.evening_detective.GraphNodeR\x04node\"\x0f\n" +
"\rUpdateNodeRsp\"\xa8\x01\n" +
"\tGraphNode\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x05R\x02id\x12\x14\n" +
"\x05label\x18\x02 \x01(\tR\x05label\x12\x12\n" +
"\x04name\x18\x03 \x01(\tR\x04name\x12\x12\n" +
"\x04text\x18\x04 \x01(\tR\x04text\x12M\n" +
"\fapplications\x18\x05 \x03(\v2).crabs.evening_detective.GraphApplicationR\fapplications\"&\n" +
"\x04type\x18\x04 \x01(\tR\x04type\"[\n" +
"\rUpdateNodeReq\x12\x12\n" +
"\x04code\x18\x01 \x01(\tR\x04code\x126\n" +
"\x04node\x18\x02 \x01(\v2\".crabs.evening_detective.GraphNodeR\x04node\"\x0f\n" +
"\rUpdateNodeRsp\"\x96\x01\n" +
"\tGraphNode\x12\x12\n" +
"\x04code\x18\x01 \x01(\tR\x04code\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
"\x04text\x18\x03 \x01(\tR\x04text\x12M\n" +
"\fapplications\x18\x04 \x03(\v2).crabs.evening_detective.GraphApplicationR\fapplications\"&\n" +
"\x10GraphApplication\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name2\xe4\v\n" +
"\x10EveningDetective\x12Y\n" +