add task apis
This commit is contained in:
+131
-75
@@ -118,23 +118,110 @@ func (*EmtpyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type CreateRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Time int32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
|
||||
Province int64 `protobuf:"varint,3,opt,name=province,proto3" json:"province,omitempty"`
|
||||
ProvinceName string `protobuf:"bytes,4,opt,name=province_name,json=provinceName,proto3" json:"province_name,omitempty"`
|
||||
Task int32 `protobuf:"varint,5,opt,name=task,proto3" json:"task,omitempty"`
|
||||
Award float64 `protobuf:"fixed64,6,opt,name=award,proto3" json:"award,omitempty"`
|
||||
ProductId int64 `protobuf:"varint,7,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateRequest) Reset() {
|
||||
*x = CreateRequest{}
|
||||
mi := &file_task_task_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetType() int32 {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetTime() int32 {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetProvince() int64 {
|
||||
if x != nil {
|
||||
return x.Province
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetProvinceName() string {
|
||||
if x != nil {
|
||||
return x.ProvinceName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetTask() int32 {
|
||||
if x != nil {
|
||||
return x.Task
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetAward() float64 {
|
||||
if x != nil {
|
||||
return x.Award
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateRequest) GetProductId() int64 {
|
||||
if x != nil {
|
||||
return x.ProductId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type EditRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Time int32 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
|
||||
Province int64 `protobuf:"varint,4,opt,name=province,proto3" json:"province,omitempty"`
|
||||
ProvinceName string `protobuf:"bytes,5,opt,name=province_name,json=provinceName,proto3" json:"province_name,omitempty"`
|
||||
Task string `protobuf:"bytes,6,opt,name=task,proto3" json:"task,omitempty"`
|
||||
Award string `protobuf:"bytes,7,opt,name=award,proto3" json:"award,omitempty"`
|
||||
ProductId int64 `protobuf:"varint,8,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
|
||||
Task int32 `protobuf:"varint,2,opt,name=task,proto3" json:"task,omitempty"`
|
||||
Award float64 `protobuf:"fixed64,3,opt,name=award,proto3" json:"award,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EditRequest) Reset() {
|
||||
*x = EditRequest{}
|
||||
mi := &file_task_task_proto_msgTypes[2]
|
||||
mi := &file_task_task_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -146,7 +233,7 @@ func (x *EditRequest) String() string {
|
||||
func (*EditRequest) ProtoMessage() {}
|
||||
|
||||
func (x *EditRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_proto_msgTypes[2]
|
||||
mi := &file_task_task_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -159,7 +246,7 @@ func (x *EditRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use EditRequest.ProtoReflect.Descriptor instead.
|
||||
func (*EditRequest) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_proto_rawDescGZIP(), []int{2}
|
||||
return file_task_task_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetId() int64 {
|
||||
@@ -169,52 +256,17 @@ func (x *EditRequest) GetId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetType() int32 {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetTime() int32 {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetProvince() int64 {
|
||||
if x != nil {
|
||||
return x.Province
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetProvinceName() string {
|
||||
if x != nil {
|
||||
return x.ProvinceName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetTask() string {
|
||||
func (x *EditRequest) GetTask() int32 {
|
||||
if x != nil {
|
||||
return x.Task
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetAward() string {
|
||||
func (x *EditRequest) GetAward() float64 {
|
||||
if x != nil {
|
||||
return x.Award
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditRequest) GetProductId() int64 {
|
||||
if x != nil {
|
||||
return x.ProductId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -227,7 +279,7 @@ type IdRequest struct {
|
||||
|
||||
func (x *IdRequest) Reset() {
|
||||
*x = IdRequest{}
|
||||
mi := &file_task_task_proto_msgTypes[3]
|
||||
mi := &file_task_task_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -239,7 +291,7 @@ func (x *IdRequest) String() string {
|
||||
func (*IdRequest) ProtoMessage() {}
|
||||
|
||||
func (x *IdRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_proto_msgTypes[3]
|
||||
mi := &file_task_task_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -252,7 +304,7 @@ func (x *IdRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IdRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IdRequest) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_proto_rawDescGZIP(), []int{3}
|
||||
return file_task_task_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *IdRequest) GetId() int64 {
|
||||
@@ -273,7 +325,7 @@ type StatusRequest struct {
|
||||
|
||||
func (x *StatusRequest) Reset() {
|
||||
*x = StatusRequest{}
|
||||
mi := &file_task_task_proto_msgTypes[4]
|
||||
mi := &file_task_task_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -285,7 +337,7 @@ func (x *StatusRequest) String() string {
|
||||
func (*StatusRequest) ProtoMessage() {}
|
||||
|
||||
func (x *StatusRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_task_task_proto_msgTypes[4]
|
||||
mi := &file_task_task_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -298,7 +350,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
|
||||
func (*StatusRequest) Descriptor() ([]byte, []int) {
|
||||
return file_task_task_proto_rawDescGZIP(), []int{4}
|
||||
return file_task_task_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *StatusRequest) GetId() int64 {
|
||||
@@ -331,27 +383,30 @@ const file_task_task_proto_rawDesc = "" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" +
|
||||
"\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" +
|
||||
"\x04data\x18\x03 \x01(\tR\x04data\"\x0e\n" +
|
||||
"\fEmtpyRequest\"\xcf\x01\n" +
|
||||
"\fEmtpyRequest\"\xc1\x01\n" +
|
||||
"\rCreateRequest\x12\x12\n" +
|
||||
"\x04type\x18\x01 \x01(\x05R\x04type\x12\x12\n" +
|
||||
"\x04time\x18\x02 \x01(\x05R\x04time\x12\x1a\n" +
|
||||
"\bprovince\x18\x03 \x01(\x03R\bprovince\x12#\n" +
|
||||
"\rprovince_name\x18\x04 \x01(\tR\fprovinceName\x12\x12\n" +
|
||||
"\x04task\x18\x05 \x01(\x05R\x04task\x12\x14\n" +
|
||||
"\x05award\x18\x06 \x01(\x01R\x05award\x12\x1d\n" +
|
||||
"\n" +
|
||||
"product_id\x18\a \x01(\x03R\tproductId\"G\n" +
|
||||
"\vEditRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" +
|
||||
"\x04type\x18\x02 \x01(\x05R\x04type\x12\x12\n" +
|
||||
"\x04time\x18\x03 \x01(\x05R\x04time\x12\x1a\n" +
|
||||
"\bprovince\x18\x04 \x01(\x03R\bprovince\x12#\n" +
|
||||
"\rprovince_name\x18\x05 \x01(\tR\fprovinceName\x12\x12\n" +
|
||||
"\x04task\x18\x06 \x01(\tR\x04task\x12\x14\n" +
|
||||
"\x05award\x18\a \x01(\tR\x05award\x12\x1d\n" +
|
||||
"\n" +
|
||||
"product_id\x18\b \x01(\x03R\tproductId\"\x1b\n" +
|
||||
"\x04task\x18\x02 \x01(\x05R\x04task\x12\x14\n" +
|
||||
"\x05award\x18\x03 \x01(\x01R\x05award\"\x1b\n" +
|
||||
"\tIdRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\"O\n" +
|
||||
"\rStatusRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
|
||||
"\x06status\x18\x02 \x01(\x05R\x06status\x12\x16\n" +
|
||||
"\x06reason\x18\x03 \x01(\tR\x06reason2\x88\x03\n" +
|
||||
"\x06reason\x18\x03 \x01(\tR\x06reason2\x8a\x03\n" +
|
||||
"\x04Task\x12L\n" +
|
||||
"\x05Items\x12\x12.task.EmtpyRequest\x1a\x0e.task.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/task/items\x12G\n" +
|
||||
"\x04Info\x12\x0f.task.IdRequest\x1a\x0e.task.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x12\x13/admin/v3/task/info\x12M\n" +
|
||||
"\x06Create\x12\x11.task.EditRequest\x1a\x0e.task.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/task/create\x12I\n" +
|
||||
"\x04Info\x12\x0f.task.IdRequest\x1a\x0e.task.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x12\x13/admin/v3/task/info\x12O\n" +
|
||||
"\x06Create\x12\x13.task.CreateRequest\x1a\x0e.task.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/task/create\x12I\n" +
|
||||
"\x04Edit\x12\x11.task.EditRequest\x1a\x0e.task.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/admin/v3/task/edit\x12O\n" +
|
||||
"\x06Status\x12\x13.task.StatusRequest\x1a\x0e.task.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/task/statusB\bZ\x06./taskb\x06proto3"
|
||||
|
||||
@@ -367,20 +422,21 @@ func file_task_task_proto_rawDescGZIP() []byte {
|
||||
return file_task_task_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_task_task_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_task_task_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_task_task_proto_goTypes = []any{
|
||||
(*Response)(nil), // 0: task.Response
|
||||
(*EmtpyRequest)(nil), // 1: task.EmtpyRequest
|
||||
(*EditRequest)(nil), // 2: task.EditRequest
|
||||
(*IdRequest)(nil), // 3: task.IdRequest
|
||||
(*StatusRequest)(nil), // 4: task.StatusRequest
|
||||
(*CreateRequest)(nil), // 2: task.CreateRequest
|
||||
(*EditRequest)(nil), // 3: task.EditRequest
|
||||
(*IdRequest)(nil), // 4: task.IdRequest
|
||||
(*StatusRequest)(nil), // 5: task.StatusRequest
|
||||
}
|
||||
var file_task_task_proto_depIdxs = []int32{
|
||||
1, // 0: task.Task.Items:input_type -> task.EmtpyRequest
|
||||
3, // 1: task.Task.Info:input_type -> task.IdRequest
|
||||
2, // 2: task.Task.Create:input_type -> task.EditRequest
|
||||
2, // 3: task.Task.Edit:input_type -> task.EditRequest
|
||||
4, // 4: task.Task.Status:input_type -> task.StatusRequest
|
||||
4, // 1: task.Task.Info:input_type -> task.IdRequest
|
||||
2, // 2: task.Task.Create:input_type -> task.CreateRequest
|
||||
3, // 3: task.Task.Edit:input_type -> task.EditRequest
|
||||
5, // 4: task.Task.Status:input_type -> task.StatusRequest
|
||||
0, // 5: task.Task.Items:output_type -> task.Response
|
||||
0, // 6: task.Task.Info:output_type -> task.Response
|
||||
0, // 7: task.Task.Create:output_type -> task.Response
|
||||
@@ -404,7 +460,7 @@ func file_task_task_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_task_task_proto_rawDesc), len(file_task_task_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user