chore(api)!: added new fields to contract
This commit is contained in:
+27
-6
@@ -85,6 +85,7 @@ type Task struct {
|
||||
MaxPoints int32 `protobuf:"varint,6,opt,name=max_points,json=maxPoints,proto3" json:"max_points,omitempty"`
|
||||
MaxAttempts int32 `protobuf:"varint,7,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
|
||||
Type TaskType `protobuf:"varint,8,opt,name=type,proto3,enum=task.TaskType" json:"type,omitempty"`
|
||||
AnswerUrl string `protobuf:"bytes,11,opt,name=answer_url,json=answerUrl,proto3" json:"answer_url,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -177,6 +178,13 @@ func (x *Task) GetType() TaskType {
|
||||
return TaskType_TASK_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *Task) GetAnswerUrl() string {
|
||||
if x != nil {
|
||||
return x.AnswerUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Task) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
@@ -195,7 +203,8 @@ type TaskAttachment struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
FileUrl string `protobuf:"bytes,2,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,3,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
|
||||
Mountpoint string `protobuf:"bytes,3,opt,name=mountpoint,proto3" json:"mountpoint,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,4,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -244,6 +253,13 @@ func (x *TaskAttachment) GetFileUrl() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TaskAttachment) GetMountpoint() string {
|
||||
if x != nil {
|
||||
return x.Mountpoint
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TaskAttachment) GetIsPublic() bool {
|
||||
if x != nil {
|
||||
return x.IsPublic
|
||||
@@ -527,7 +543,7 @@ var File_api_proto_task_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_api_proto_task_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x14api/proto/task.proto\x12\x04task\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x89\x03\n" +
|
||||
"\x14api/proto/task.proto\x12\x04task\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xa8\x03\n" +
|
||||
"\x04Task\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12%\n" +
|
||||
"\x0ecompetition_id\x18\x02 \x01(\tR\rcompetitionId\x12\x14\n" +
|
||||
@@ -537,16 +553,21 @@ const file_api_proto_task_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"max_points\x18\x06 \x01(\x05R\tmaxPoints\x12!\n" +
|
||||
"\fmax_attempts\x18\a \x01(\x05R\vmaxAttempts\x12\"\n" +
|
||||
"\x04type\x18\b \x01(\x0e2\x0e.task.TaskTypeR\x04type\x129\n" +
|
||||
"\x04type\x18\b \x01(\x0e2\x0e.task.TaskTypeR\x04type\x12\x1d\n" +
|
||||
"\n" +
|
||||
"answer_url\x18\v \x01(\tR\tanswerUrl\x129\n" +
|
||||
"\n" +
|
||||
"created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\n" +
|
||||
" \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"X\n" +
|
||||
" \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"x\n" +
|
||||
"\x0eTaskAttachment\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n" +
|
||||
"\bfile_url\x18\x02 \x01(\tR\afileUrl\x12\x1b\n" +
|
||||
"\tis_public\x18\x03 \x01(\bR\bisPublic\")\n" +
|
||||
"\bfile_url\x18\x02 \x01(\tR\afileUrl\x12\x1e\n" +
|
||||
"\n" +
|
||||
"mountpoint\x18\x03 \x01(\tR\n" +
|
||||
"mountpoint\x12\x1b\n" +
|
||||
"\tis_public\x18\x04 \x01(\bR\bisPublic\")\n" +
|
||||
"\x0eGetTaskRequest\x12\x17\n" +
|
||||
"\atask_id\x18\x01 \x01(\tR\x06taskId\",\n" +
|
||||
"\x11DeleteTaskRequest\x12\x17\n" +
|
||||
|
||||
Reference in New Issue
Block a user