增加工单相关接口定义

This commit is contained in:
GoEdgeLab
2022-08-03 10:45:23 +08:00
parent fc5afc0fa2
commit 8304410958
14 changed files with 7299 additions and 3102 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,265 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: models/model_user_ticket.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 工单
type UserTicket struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
CategoryId int64 `protobuf:"varint,2,opt,name=categoryId,proto3" json:"categoryId,omitempty"`
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
Body string `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
LastLogAt int64 `protobuf:"varint,8,opt,name=lastLogAt,proto3" json:"lastLogAt,omitempty"`
UserTicketCategory *UserTicketCategory `protobuf:"bytes,30,opt,name=userTicketCategory,proto3" json:"userTicketCategory,omitempty"`
User *User `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"`
LatestUserTicketLog *UserTicketLog `protobuf:"bytes,32,opt,name=latestUserTicketLog,proto3" json:"latestUserTicketLog,omitempty"`
}
func (x *UserTicket) Reset() {
*x = UserTicket{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_user_ticket_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserTicket) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserTicket) ProtoMessage() {}
func (x *UserTicket) ProtoReflect() protoreflect.Message {
mi := &file_models_model_user_ticket_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserTicket.ProtoReflect.Descriptor instead.
func (*UserTicket) Descriptor() ([]byte, []int) {
return file_models_model_user_ticket_proto_rawDescGZIP(), []int{0}
}
func (x *UserTicket) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserTicket) GetCategoryId() int64 {
if x != nil {
return x.CategoryId
}
return 0
}
func (x *UserTicket) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *UserTicket) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *UserTicket) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *UserTicket) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *UserTicket) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *UserTicket) GetLastLogAt() int64 {
if x != nil {
return x.LastLogAt
}
return 0
}
func (x *UserTicket) GetUserTicketCategory() *UserTicketCategory {
if x != nil {
return x.UserTicketCategory
}
return nil
}
func (x *UserTicket) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
func (x *UserTicket) GetLatestUserTicketLog() *UserTicketLog {
if x != nil {
return x.LatestUserTicketLog
}
return nil
}
var File_models_model_user_ticket_proto protoreflect.FileDescriptor
var file_models_model_user_ticket_proto_rawDesc = []byte{
0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x02, 0x70, 0x62, 0x1a, 0x27, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74,
0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x0a, 0x55,
0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62,
0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f, 0x67,
0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f,
0x67, 0x41, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65,
0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x12, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x04, 0x75,
0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x13, 0x6c, 0x61, 0x74,
0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_user_ticket_proto_rawDescOnce sync.Once
file_models_model_user_ticket_proto_rawDescData = file_models_model_user_ticket_proto_rawDesc
)
func file_models_model_user_ticket_proto_rawDescGZIP() []byte {
file_models_model_user_ticket_proto_rawDescOnce.Do(func() {
file_models_model_user_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_ticket_proto_rawDescData)
})
return file_models_model_user_ticket_proto_rawDescData
}
var file_models_model_user_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_user_ticket_proto_goTypes = []interface{}{
(*UserTicket)(nil), // 0: pb.UserTicket
(*UserTicketCategory)(nil), // 1: pb.UserTicketCategory
(*User)(nil), // 2: pb.User
(*UserTicketLog)(nil), // 3: pb.UserTicketLog
}
var file_models_model_user_ticket_proto_depIdxs = []int32{
1, // 0: pb.UserTicket.userTicketCategory:type_name -> pb.UserTicketCategory
2, // 1: pb.UserTicket.user:type_name -> pb.User
3, // 2: pb.UserTicket.latestUserTicketLog:type_name -> pb.UserTicketLog
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_models_model_user_ticket_proto_init() }
func file_models_model_user_ticket_proto_init() {
if File_models_model_user_ticket_proto != nil {
return
}
file_models_model_user_ticket_category_proto_init()
file_models_model_user_proto_init()
file_models_model_user_ticket_log_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_user_ticket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserTicket); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_user_ticket_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_user_ticket_proto_goTypes,
DependencyIndexes: file_models_model_user_ticket_proto_depIdxs,
MessageInfos: file_models_model_user_ticket_proto_msgTypes,
}.Build()
File_models_model_user_ticket_proto = out.File
file_models_model_user_ticket_proto_rawDesc = nil
file_models_model_user_ticket_proto_goTypes = nil
file_models_model_user_ticket_proto_depIdxs = nil
}

View File

@@ -0,0 +1,167 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: models/model_user_ticket_category.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 工单分类
type UserTicketCategory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
}
func (x *UserTicketCategory) Reset() {
*x = UserTicketCategory{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_user_ticket_category_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserTicketCategory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserTicketCategory) ProtoMessage() {}
func (x *UserTicketCategory) ProtoReflect() protoreflect.Message {
mi := &file_models_model_user_ticket_category_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserTicketCategory.ProtoReflect.Descriptor instead.
func (*UserTicketCategory) Descriptor() ([]byte, []int) {
return file_models_model_user_ticket_category_proto_rawDescGZIP(), []int{0}
}
func (x *UserTicketCategory) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserTicketCategory) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UserTicketCategory) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
var File_models_model_user_ticket_category_proto protoreflect.FileDescriptor
var file_models_model_user_ticket_category_proto_rawDesc = []byte{
0x0a, 0x27, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67,
0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x4c, 0x0a,
0x12, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67,
0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_user_ticket_category_proto_rawDescOnce sync.Once
file_models_model_user_ticket_category_proto_rawDescData = file_models_model_user_ticket_category_proto_rawDesc
)
func file_models_model_user_ticket_category_proto_rawDescGZIP() []byte {
file_models_model_user_ticket_category_proto_rawDescOnce.Do(func() {
file_models_model_user_ticket_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_ticket_category_proto_rawDescData)
})
return file_models_model_user_ticket_category_proto_rawDescData
}
var file_models_model_user_ticket_category_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_user_ticket_category_proto_goTypes = []interface{}{
(*UserTicketCategory)(nil), // 0: pb.UserTicketCategory
}
var file_models_model_user_ticket_category_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_models_model_user_ticket_category_proto_init() }
func file_models_model_user_ticket_category_proto_init() {
if File_models_model_user_ticket_category_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_models_model_user_ticket_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserTicketCategory); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_user_ticket_category_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_user_ticket_category_proto_goTypes,
DependencyIndexes: file_models_model_user_ticket_category_proto_depIdxs,
MessageInfos: file_models_model_user_ticket_category_proto_msgTypes,
}.Build()
File_models_model_user_ticket_category_proto = out.File
file_models_model_user_ticket_category_proto_rawDesc = nil
file_models_model_user_ticket_category_proto_goTypes = nil
file_models_model_user_ticket_category_proto_depIdxs = nil
}

View File

@@ -0,0 +1,245 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: models/model_user_ticket_log.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 工单日志
type UserTicketLog struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"`
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
TicketId int64 `protobuf:"varint,4,opt,name=ticketId,proto3" json:"ticketId,omitempty"`
Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
IsReadonly bool `protobuf:"varint,8,opt,name=isReadonly,proto3" json:"isReadonly,omitempty"`
Admin *Admin `protobuf:"bytes,30,opt,name=admin,proto3" json:"admin,omitempty"`
User *User `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"`
}
func (x *UserTicketLog) Reset() {
*x = UserTicketLog{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_user_ticket_log_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserTicketLog) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserTicketLog) ProtoMessage() {}
func (x *UserTicketLog) ProtoReflect() protoreflect.Message {
mi := &file_models_model_user_ticket_log_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserTicketLog.ProtoReflect.Descriptor instead.
func (*UserTicketLog) Descriptor() ([]byte, []int) {
return file_models_model_user_ticket_log_proto_rawDescGZIP(), []int{0}
}
func (x *UserTicketLog) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserTicketLog) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *UserTicketLog) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *UserTicketLog) GetTicketId() int64 {
if x != nil {
return x.TicketId
}
return 0
}
func (x *UserTicketLog) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *UserTicketLog) GetComment() string {
if x != nil {
return x.Comment
}
return ""
}
func (x *UserTicketLog) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *UserTicketLog) GetIsReadonly() bool {
if x != nil {
return x.IsReadonly
}
return false
}
func (x *UserTicketLog) GetAdmin() *Admin {
if x != nil {
return x.Admin
}
return nil
}
func (x *UserTicketLog) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
var File_models_model_user_ticket_log_proto protoreflect.FileDescriptor
var file_models_model_user_ticket_log_proto_rawDesc = []byte{
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x0d,
0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
0x73, 0x52, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0a, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x61,
0x64, 0x6d, 0x69, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e,
0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x04,
0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_user_ticket_log_proto_rawDescOnce sync.Once
file_models_model_user_ticket_log_proto_rawDescData = file_models_model_user_ticket_log_proto_rawDesc
)
func file_models_model_user_ticket_log_proto_rawDescGZIP() []byte {
file_models_model_user_ticket_log_proto_rawDescOnce.Do(func() {
file_models_model_user_ticket_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_ticket_log_proto_rawDescData)
})
return file_models_model_user_ticket_log_proto_rawDescData
}
var file_models_model_user_ticket_log_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_user_ticket_log_proto_goTypes = []interface{}{
(*UserTicketLog)(nil), // 0: pb.UserTicketLog
(*Admin)(nil), // 1: pb.Admin
(*User)(nil), // 2: pb.User
}
var file_models_model_user_ticket_log_proto_depIdxs = []int32{
1, // 0: pb.UserTicketLog.admin:type_name -> pb.Admin
2, // 1: pb.UserTicketLog.user:type_name -> pb.User
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_models_model_user_ticket_log_proto_init() }
func file_models_model_user_ticket_log_proto_init() {
if File_models_model_user_ticket_log_proto != nil {
return
}
file_models_model_admin_proto_init()
file_models_model_user_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_user_ticket_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserTicketLog); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_user_ticket_log_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_user_ticket_log_proto_goTypes,
DependencyIndexes: file_models_model_user_ticket_log_proto_depIdxs,
MessageInfos: file_models_model_user_ticket_log_proto_msgTypes,
}.Build()
File_models_model_user_ticket_log_proto = out.File
file_models_model_user_ticket_log_proto_rawDesc = nil
file_models_model_user_ticket_log_proto_goTypes = nil
file_models_model_user_ticket_log_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,753 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.19.4
// source: service_user_ticket_log.proto
package pb
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 创建日志
type CreateUserTicketLogRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketId int64 `protobuf:"varint,1,opt,name=userTicketId,proto3" json:"userTicketId,omitempty"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
}
func (x *CreateUserTicketLogRequest) Reset() {
*x = CreateUserTicketLogRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateUserTicketLogRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateUserTicketLogRequest) ProtoMessage() {}
func (x *CreateUserTicketLogRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateUserTicketLogRequest.ProtoReflect.Descriptor instead.
func (*CreateUserTicketLogRequest) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{0}
}
func (x *CreateUserTicketLogRequest) GetUserTicketId() int64 {
if x != nil {
return x.UserTicketId
}
return 0
}
func (x *CreateUserTicketLogRequest) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *CreateUserTicketLogRequest) GetComment() string {
if x != nil {
return x.Comment
}
return ""
}
type CreateUserTicketLogResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketLogId int64 `protobuf:"varint,1,opt,name=userTicketLogId,proto3" json:"userTicketLogId,omitempty"`
}
func (x *CreateUserTicketLogResponse) Reset() {
*x = CreateUserTicketLogResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateUserTicketLogResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateUserTicketLogResponse) ProtoMessage() {}
func (x *CreateUserTicketLogResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateUserTicketLogResponse.ProtoReflect.Descriptor instead.
func (*CreateUserTicketLogResponse) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{1}
}
func (x *CreateUserTicketLogResponse) GetUserTicketLogId() int64 {
if x != nil {
return x.UserTicketLogId
}
return 0
}
// 删除日志
type DeleteUserTicketLogRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketLogId int64 `protobuf:"varint,1,opt,name=userTicketLogId,proto3" json:"userTicketLogId,omitempty"`
}
func (x *DeleteUserTicketLogRequest) Reset() {
*x = DeleteUserTicketLogRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteUserTicketLogRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteUserTicketLogRequest) ProtoMessage() {}
func (x *DeleteUserTicketLogRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteUserTicketLogRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserTicketLogRequest) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{2}
}
func (x *DeleteUserTicketLogRequest) GetUserTicketLogId() int64 {
if x != nil {
return x.UserTicketLogId
}
return 0
}
// 查询日志数量
type CountUserTicketLogsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketId int64 `protobuf:"varint,1,opt,name=userTicketId,proto3" json:"userTicketId,omitempty"`
}
func (x *CountUserTicketLogsRequest) Reset() {
*x = CountUserTicketLogsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CountUserTicketLogsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CountUserTicketLogsRequest) ProtoMessage() {}
func (x *CountUserTicketLogsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CountUserTicketLogsRequest.ProtoReflect.Descriptor instead.
func (*CountUserTicketLogsRequest) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{3}
}
func (x *CountUserTicketLogsRequest) GetUserTicketId() int64 {
if x != nil {
return x.UserTicketId
}
return 0
}
// 列出单页日志
type ListUserTicketLogsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketId int64 `protobuf:"varint,1,opt,name=userTicketId,proto3" json:"userTicketId,omitempty"`
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
}
func (x *ListUserTicketLogsRequest) Reset() {
*x = ListUserTicketLogsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListUserTicketLogsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListUserTicketLogsRequest) ProtoMessage() {}
func (x *ListUserTicketLogsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListUserTicketLogsRequest.ProtoReflect.Descriptor instead.
func (*ListUserTicketLogsRequest) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{4}
}
func (x *ListUserTicketLogsRequest) GetUserTicketId() int64 {
if x != nil {
return x.UserTicketId
}
return 0
}
func (x *ListUserTicketLogsRequest) GetOffset() int64 {
if x != nil {
return x.Offset
}
return 0
}
func (x *ListUserTicketLogsRequest) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
type ListUserTicketLogsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserTicketLogs []*UserTicketLog `protobuf:"bytes,1,rep,name=userTicketLogs,proto3" json:"userTicketLogs,omitempty"`
}
func (x *ListUserTicketLogsResponse) Reset() {
*x = ListUserTicketLogsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_user_ticket_log_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListUserTicketLogsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListUserTicketLogsResponse) ProtoMessage() {}
func (x *ListUserTicketLogsResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_user_ticket_log_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListUserTicketLogsResponse.ProtoReflect.Descriptor instead.
func (*ListUserTicketLogsResponse) Descriptor() ([]byte, []int) {
return file_service_user_ticket_log_proto_rawDescGZIP(), []int{5}
}
func (x *ListUserTicketLogsResponse) GetUserTicketLogs() []*UserTicketLog {
if x != nil {
return x.UserTicketLogs
}
return nil
}
var File_service_user_ticket_log_proto protoreflect.FileDescriptor
var file_service_user_ticket_log_proto_rawDesc = []byte{
0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x02, 0x70, 0x62, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f,
0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x72, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x22, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x22,
0x46, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a,
0x0f, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x1a, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x73, 0x65,
0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x19, 0x4c, 0x69, 0x73,
0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69,
0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x73,
0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73,
0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x57, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73,
0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b,
0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52,
0x0e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x32,
0xd7, 0x02, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f,
0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12,
0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54,
0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x45, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69,
0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43,
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1e,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63,
0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f,
0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x67,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_user_ticket_log_proto_rawDescOnce sync.Once
file_service_user_ticket_log_proto_rawDescData = file_service_user_ticket_log_proto_rawDesc
)
func file_service_user_ticket_log_proto_rawDescGZIP() []byte {
file_service_user_ticket_log_proto_rawDescOnce.Do(func() {
file_service_user_ticket_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_user_ticket_log_proto_rawDescData)
})
return file_service_user_ticket_log_proto_rawDescData
}
var file_service_user_ticket_log_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_user_ticket_log_proto_goTypes = []interface{}{
(*CreateUserTicketLogRequest)(nil), // 0: pb.CreateUserTicketLogRequest
(*CreateUserTicketLogResponse)(nil), // 1: pb.CreateUserTicketLogResponse
(*DeleteUserTicketLogRequest)(nil), // 2: pb.DeleteUserTicketLogRequest
(*CountUserTicketLogsRequest)(nil), // 3: pb.CountUserTicketLogsRequest
(*ListUserTicketLogsRequest)(nil), // 4: pb.ListUserTicketLogsRequest
(*ListUserTicketLogsResponse)(nil), // 5: pb.ListUserTicketLogsResponse
(*UserTicketLog)(nil), // 6: pb.UserTicketLog
(*RPCSuccess)(nil), // 7: pb.RPCSuccess
(*RPCCountResponse)(nil), // 8: pb.RPCCountResponse
}
var file_service_user_ticket_log_proto_depIdxs = []int32{
6, // 0: pb.ListUserTicketLogsResponse.userTicketLogs:type_name -> pb.UserTicketLog
0, // 1: pb.UserTicketLogService.createUserTicketLog:input_type -> pb.CreateUserTicketLogRequest
2, // 2: pb.UserTicketLogService.deleteUserTicketLog:input_type -> pb.DeleteUserTicketLogRequest
3, // 3: pb.UserTicketLogService.countUserTicketLogs:input_type -> pb.CountUserTicketLogsRequest
4, // 4: pb.UserTicketLogService.listUserTicketLogs:input_type -> pb.ListUserTicketLogsRequest
1, // 5: pb.UserTicketLogService.createUserTicketLog:output_type -> pb.CreateUserTicketLogResponse
7, // 6: pb.UserTicketLogService.deleteUserTicketLog:output_type -> pb.RPCSuccess
8, // 7: pb.UserTicketLogService.countUserTicketLogs:output_type -> pb.RPCCountResponse
5, // 8: pb.UserTicketLogService.listUserTicketLogs:output_type -> pb.ListUserTicketLogsResponse
5, // [5:9] is the sub-list for method output_type
1, // [1:5] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_service_user_ticket_log_proto_init() }
func file_service_user_ticket_log_proto_init() {
if File_service_user_ticket_log_proto != nil {
return
}
file_models_model_user_ticket_log_proto_init()
file_models_rpc_messages_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_user_ticket_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateUserTicketLogRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_ticket_log_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateUserTicketLogResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_ticket_log_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteUserTicketLogRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_ticket_log_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountUserTicketLogsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_ticket_log_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListUserTicketLogsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_user_ticket_log_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListUserTicketLogsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_user_ticket_log_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_user_ticket_log_proto_goTypes,
DependencyIndexes: file_service_user_ticket_log_proto_depIdxs,
MessageInfos: file_service_user_ticket_log_proto_msgTypes,
}.Build()
File_service_user_ticket_log_proto = out.File
file_service_user_ticket_log_proto_rawDesc = nil
file_service_user_ticket_log_proto_goTypes = nil
file_service_user_ticket_log_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// UserTicketLogServiceClient is the client API for UserTicketLogService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type UserTicketLogServiceClient interface {
// 创建日志
CreateUserTicketLog(ctx context.Context, in *CreateUserTicketLogRequest, opts ...grpc.CallOption) (*CreateUserTicketLogResponse, error)
// 删除日志
DeleteUserTicketLog(ctx context.Context, in *DeleteUserTicketLogRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查询日志数量
CountUserTicketLogs(ctx context.Context, in *CountUserTicketLogsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页日志
ListUserTicketLogs(ctx context.Context, in *ListUserTicketLogsRequest, opts ...grpc.CallOption) (*ListUserTicketLogsResponse, error)
}
type userTicketLogServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserTicketLogServiceClient(cc grpc.ClientConnInterface) UserTicketLogServiceClient {
return &userTicketLogServiceClient{cc}
}
func (c *userTicketLogServiceClient) CreateUserTicketLog(ctx context.Context, in *CreateUserTicketLogRequest, opts ...grpc.CallOption) (*CreateUserTicketLogResponse, error) {
out := new(CreateUserTicketLogResponse)
err := c.cc.Invoke(ctx, "/pb.UserTicketLogService/createUserTicketLog", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userTicketLogServiceClient) DeleteUserTicketLog(ctx context.Context, in *DeleteUserTicketLogRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.UserTicketLogService/deleteUserTicketLog", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userTicketLogServiceClient) CountUserTicketLogs(ctx context.Context, in *CountUserTicketLogsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.UserTicketLogService/countUserTicketLogs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userTicketLogServiceClient) ListUserTicketLogs(ctx context.Context, in *ListUserTicketLogsRequest, opts ...grpc.CallOption) (*ListUserTicketLogsResponse, error) {
out := new(ListUserTicketLogsResponse)
err := c.cc.Invoke(ctx, "/pb.UserTicketLogService/listUserTicketLogs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserTicketLogServiceServer is the server API for UserTicketLogService service.
type UserTicketLogServiceServer interface {
// 创建日志
CreateUserTicketLog(context.Context, *CreateUserTicketLogRequest) (*CreateUserTicketLogResponse, error)
// 删除日志
DeleteUserTicketLog(context.Context, *DeleteUserTicketLogRequest) (*RPCSuccess, error)
// 查询日志数量
CountUserTicketLogs(context.Context, *CountUserTicketLogsRequest) (*RPCCountResponse, error)
// 列出单页日志
ListUserTicketLogs(context.Context, *ListUserTicketLogsRequest) (*ListUserTicketLogsResponse, error)
}
// UnimplementedUserTicketLogServiceServer can be embedded to have forward compatible implementations.
type UnimplementedUserTicketLogServiceServer struct {
}
func (*UnimplementedUserTicketLogServiceServer) CreateUserTicketLog(context.Context, *CreateUserTicketLogRequest) (*CreateUserTicketLogResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUserTicketLog not implemented")
}
func (*UnimplementedUserTicketLogServiceServer) DeleteUserTicketLog(context.Context, *DeleteUserTicketLogRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserTicketLog not implemented")
}
func (*UnimplementedUserTicketLogServiceServer) CountUserTicketLogs(context.Context, *CountUserTicketLogsRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountUserTicketLogs not implemented")
}
func (*UnimplementedUserTicketLogServiceServer) ListUserTicketLogs(context.Context, *ListUserTicketLogsRequest) (*ListUserTicketLogsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUserTicketLogs not implemented")
}
func RegisterUserTicketLogServiceServer(s *grpc.Server, srv UserTicketLogServiceServer) {
s.RegisterService(&_UserTicketLogService_serviceDesc, srv)
}
func _UserTicketLogService_CreateUserTicketLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserTicketLogRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserTicketLogServiceServer).CreateUserTicketLog(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserTicketLogService/CreateUserTicketLog",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserTicketLogServiceServer).CreateUserTicketLog(ctx, req.(*CreateUserTicketLogRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserTicketLogService_DeleteUserTicketLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteUserTicketLogRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserTicketLogServiceServer).DeleteUserTicketLog(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserTicketLogService/DeleteUserTicketLog",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserTicketLogServiceServer).DeleteUserTicketLog(ctx, req.(*DeleteUserTicketLogRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserTicketLogService_CountUserTicketLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountUserTicketLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserTicketLogServiceServer).CountUserTicketLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserTicketLogService/CountUserTicketLogs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserTicketLogServiceServer).CountUserTicketLogs(ctx, req.(*CountUserTicketLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserTicketLogService_ListUserTicketLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListUserTicketLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserTicketLogServiceServer).ListUserTicketLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.UserTicketLogService/ListUserTicketLogs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserTicketLogServiceServer).ListUserTicketLogs(ctx, req.(*ListUserTicketLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _UserTicketLogService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.UserTicketLogService",
HandlerType: (*UserTicketLogServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createUserTicketLog",
Handler: _UserTicketLogService_CreateUserTicketLog_Handler,
},
{
MethodName: "deleteUserTicketLog",
Handler: _UserTicketLogService_DeleteUserTicketLog_Handler,
},
{
MethodName: "countUserTicketLogs",
Handler: _UserTicketLogService_CountUserTicketLogs_Handler,
},
{
MethodName: "listUserTicketLogs",
Handler: _UserTicketLogService_ListUserTicketLogs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_user_ticket_log.proto",
}

View File

@@ -0,0 +1,24 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_user_ticket_category.proto";
import "models/model_user.proto";
import "models/model_user_ticket_log.proto";
// 工单
message UserTicket {
int64 id = 1;
int64 categoryId = 2;
int64 userId = 3;
string subject = 4;
string body = 5;
string status = 6;
int64 createdAt = 7;
int64 lastLogAt = 8;
UserTicketCategory userTicketCategory = 30;
User user = 31;
UserTicketLog latestUserTicketLog = 32;
}

View File

@@ -0,0 +1,11 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
// 工单分类
message UserTicketCategory {
int64 id = 1;
string name = 2;
bool isOn = 3;
}

View File

@@ -0,0 +1,22 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_admin.proto";
import "models/model_user.proto";
// 工单日志
message UserTicketLog {
int64 id = 1;
int64 adminId = 2;
int64 userId = 3;
int64 ticketId = 4;
string status = 5;
string comment = 6;
int64 createdAt = 7;
bool isReadonly = 8;
Admin admin = 30;
User user = 31;
}

View File

@@ -0,0 +1,81 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_user_ticket.proto";
import "models/rpc_messages.proto";
// 工单服务
service UserTicketService {
// 创建工单
rpc createUserTicket(CreateUserTicketRequest) returns (CreateUserTicketResponse);
// 修改工单
rpc updateUserTicket(UpdateUserTicketRequest) returns (RPCSuccess);
// 删除工单
rpc deleteUserTicket(DeleteUserTicketRequest) returns (RPCSuccess);
// 计算工单数量
rpc countUserTickets(CountUserTicketsRequest) returns (RPCCountResponse);
// 列出单页工单
rpc listUserTickets(ListUserTicketsRequest) returns (ListUserTicketsResponse);
// 查找单个工单
rpc findUserTicket(FindUserTicketRequest) returns (FindUserTicketResponse);
}
// 创建工单
message CreateUserTicketRequest {
int64 userTicketCategoryId = 1;
string subject = 2;
string body = 3;
}
message CreateUserTicketResponse {
int64 userTicketId = 1;
}
// 修改工单
message UpdateUserTicketRequest {
int64 userTicketId = 1;
int64 userTicketCategoryId = 2;
string subject = 3;
string body = 4;
}
// 删除工单
message DeleteUserTicketRequest {
int64 userTicketId = 1;
}
// 计算工单数量
message CountUserTicketsRequest {
int64 userId = 1;
int64 userTicketCategoryId = 2;
string status = 3;
}
// 列出单页工单
message ListUserTicketsRequest {
int64 userId = 1;
int64 userTicketCategoryId = 2;
string status = 3;
int64 offset = 4;
int64 size = 5;
}
message ListUserTicketsResponse {
repeated UserTicket userTickets = 1;
}
// 查找单个工单
message FindUserTicketRequest {
int64 userTicketId = 1;
}
message FindUserTicketResponse {
UserTicket userTicket = 1;
}

View File

@@ -0,0 +1,76 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_user_ticket_category.proto";
import "models/rpc_messages.proto";
// 工单分类服务
service UserTicketCategoryService {
// 创建分类
rpc createUserTicketCategory(CreateUserTicketCategoryRequest) returns (CreateUserTicketCategoryResponse);
// 修改分类
rpc updateUserTicketCategory(UpdateUserTicketCategoryRequest) returns (RPCSuccess);
// 删除分类
rpc deleteUserTicketCategory(DeleteUserTicketCategoryRequest) returns (RPCSuccess);
// 查找所有分类
rpc findAllUserTicketCategories(FindAllUserTicketCategoriesRequest) returns (FindAllUserTicketCategoriesResponse);
// 查找所有启用中的分类
rpc findAllOnUserTicketCategories(FindAllOnUserTicketCategoriesRequest) returns (FindAllOnUserTicketCategoriesResponse);
// 查询单个分类
rpc findUserTicketCategory(FindUserTicketCategoryRequest) returns (FindUserTicketCategoryResponse);
}
// 创建分类
message CreateUserTicketCategoryRequest {
string name = 1;
}
message CreateUserTicketCategoryResponse {
int64 userTicketCategoryId = 1;
}
// 修改分类
message UpdateUserTicketCategoryRequest {
int64 userTicketCategoryId = 1;
string name = 2;
bool isOn = 3;
}
// 删除分类
message DeleteUserTicketCategoryRequest {
int64 userTicketCategoryId = 1;
}
// 查找所有分类
message FindAllUserTicketCategoriesRequest {
}
message FindAllUserTicketCategoriesResponse {
repeated UserTicketCategory userTicketCategories = 1;
}
// 查找所有启用中的分类
message FindAllOnUserTicketCategoriesRequest {
}
message FindAllOnUserTicketCategoriesResponse {
repeated UserTicketCategory userTicketCategories = 1;
}
// 查询单个分类
message FindUserTicketCategoryRequest {
int64 userTicketCategoryId = 1;
}
message FindUserTicketCategoryResponse {
UserTicketCategory userTicketCategory = 1;
}

View File

@@ -0,0 +1,54 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_user_ticket_log.proto";
import "models/rpc_messages.proto";
// 工单日志服务
service UserTicketLogService {
// 创建日志
rpc createUserTicketLog(CreateUserTicketLogRequest) returns (CreateUserTicketLogResponse);
// 删除日志
rpc deleteUserTicketLog(DeleteUserTicketLogRequest) returns (RPCSuccess);
// 查询日志数量
rpc countUserTicketLogs(CountUserTicketLogsRequest) returns (RPCCountResponse);
// 列出单页日志
rpc listUserTicketLogs(ListUserTicketLogsRequest) returns (ListUserTicketLogsResponse);
}
// 创建日志
message CreateUserTicketLogRequest {
int64 userTicketId = 1;
string status = 2;
string comment = 3;
}
message CreateUserTicketLogResponse {
int64 userTicketLogId = 1;
}
// 删除日志
message DeleteUserTicketLogRequest {
int64 userTicketLogId = 1;
}
// 查询日志数量
message CountUserTicketLogsRequest {
int64 userTicketId = 1;
}
// 列出单页日志
message ListUserTicketLogsRequest {
int64 userTicketId = 1;
int64 offset = 2;
int64 size = 3;
}
message ListUserTicketLogsResponse {
repeated UserTicketLog userTicketLogs = 1;
}

View File

@@ -0,0 +1,42 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package userconfigs
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
type UserTicketStatus = string
const (
UserTicketStatusNone UserTicketStatus = "none"
UserTicketStatusSolved UserTicketStatus = "solved"
UserTicketStatusClosed UserTicketStatus = "closed"
)
func UserTicketStatusName(status UserTicketStatus) string {
switch status {
case UserTicketStatusNone:
return "进行中"
case UserTicketStatusSolved:
return "已解决"
case UserTicketStatusClosed:
return "已关闭"
}
return ""
}
func FindAllUserTicketStatusList() []*shared.Definition {
return []*shared.Definition{
{
Name: "进行中",
Code: UserTicketStatusNone,
},
{
Name: "已解决",
Code: UserTicketStatusSolved,
},
{
Name: "已关闭",
Code: UserTicketStatusClosed,
},
}
}