fix mappers

This commit is contained in:
2026-07-26 00:20:58 +07:00
parent 6057ff38a3
commit d5a99508d3
5 changed files with 29 additions and 14 deletions
+20 -10
View File
@@ -1656,10 +1656,11 @@ type Scenario struct {
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
Image *string `protobuf:"bytes,4,opt,name=image,proto3,oneof" json:"image,omitempty"`
Story *Story `protobuf:"bytes,5,opt,name=story,proto3" json:"story,omitempty"`
Author *User `protobuf:"bytes,6,opt,name=author,proto3" json:"author,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
PublishedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"`
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
Author *User `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
PublishedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1729,6 +1730,13 @@ func (x *Scenario) GetStory() *Story {
return nil
}
func (x *Scenario) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *Scenario) GetAuthor() *User {
if x != nil {
return x.Author
@@ -2822,19 +2830,21 @@ const file_main_proto_rawDesc = "" +
"\x02id\x18\x01 \x01(\x05R\x02id\"l\n" +
"\x0eGetScenarioRsp\x12\x14\n" +
"\x05error\x18\x01 \x01(\tR\x05error\x12D\n" +
"\bscenario\x18\x02 \x01(\v2(.crabs.evening_detective_server.ScenarioR\bscenario\"\xba\x03\n" +
"\bscenario\x18\x02 \x01(\v2(.crabs.evening_detective_server.ScenarioR\bscenario\"\xd2\x03\n" +
"\bScenario\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x05R\x02id\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12%\n" +
"\vdescription\x18\x03 \x01(\tH\x00R\vdescription\x88\x01\x01\x12\x19\n" +
"\x05image\x18\x04 \x01(\tH\x01R\x05image\x88\x01\x01\x12;\n" +
"\x05story\x18\x05 \x01(\v2%.crabs.evening_detective_server.StoryR\x05story\x12<\n" +
"\x06author\x18\x06 \x01(\v2$.crabs.evening_detective_server.UserR\x06author\x129\n" +
"\x05story\x18\x05 \x01(\v2%.crabs.evening_detective_server.StoryR\x05story\x12\x16\n" +
"\x06status\x18\x06 \x01(\tR\x06status\x12<\n" +
"\x06author\x18\a \x01(\v2$.crabs.evening_detective_server.UserR\x06author\x129\n" +
"\n" +
"updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x129\n" +
"updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x129\n" +
"\n" +
"created_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12=\n" +
"\fpublished_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAtB\x0e\n" +
"created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12=\n" +
"\fpublished_at\x18\n" +
" \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAtB\x0e\n" +
"\f_descriptionB\b\n" +
"\x06_image\"F\n" +
"\x05Story\x12=\n" +