// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v7.34.1 // source: allhelp/allhelp_db.proto package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) 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) ) // 任务类型(用户选择用于提醒的循环方式;服务端仅做记录,不自动触发) type TaskType int32 const ( TaskType_TaskType_Once TaskType = 0 // 一次性提醒 TaskType_TaskType_Daily TaskType = 1 // 每天重复 TaskType_TaskType_Weekly TaskType = 2 // 每周重复 TaskType_TaskType_Monthly TaskType = 3 // 每月重复 TaskType_TaskType_Cron TaskType = 4 // 自定义 cron 表达式 ) // Enum value maps for TaskType. var ( TaskType_name = map[int32]string{ 0: "TaskType_Once", 1: "TaskType_Daily", 2: "TaskType_Weekly", 3: "TaskType_Monthly", 4: "TaskType_Cron", } TaskType_value = map[string]int32{ "TaskType_Once": 0, "TaskType_Daily": 1, "TaskType_Weekly": 2, "TaskType_Monthly": 3, "TaskType_Cron": 4, } ) func (x TaskType) Enum() *TaskType { p := new(TaskType) *p = x return p } func (x TaskType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskType) Descriptor() protoreflect.EnumDescriptor { return file_allhelp_allhelp_db_proto_enumTypes[0].Descriptor() } func (TaskType) Type() protoreflect.EnumType { return &file_allhelp_allhelp_db_proto_enumTypes[0] } func (x TaskType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TaskType.Descriptor instead. func (TaskType) EnumDescriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{0} } // 任务状态(服务端仅记录用户的手动生命周期) type TaskStatus int32 const ( TaskStatus_TaskStatus_Pending TaskStatus = 0 // 进行中 TaskStatus_TaskStatus_Completed TaskStatus = 2 // 用户已确认完成 TaskStatus_TaskStatus_Cancelled TaskStatus = 3 // 已取消 ) // Enum value maps for TaskStatus. var ( TaskStatus_name = map[int32]string{ 0: "TaskStatus_Pending", 2: "TaskStatus_Completed", 3: "TaskStatus_Cancelled", } TaskStatus_value = map[string]int32{ "TaskStatus_Pending": 0, "TaskStatus_Completed": 2, "TaskStatus_Cancelled": 3, } ) func (x TaskStatus) Enum() *TaskStatus { p := new(TaskStatus) *p = x return p } func (x TaskStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (TaskStatus) Descriptor() protoreflect.EnumDescriptor { return file_allhelp_allhelp_db_proto_enumTypes[1].Descriptor() } func (TaskStatus) Type() protoreflect.EnumType { return &file_allhelp_allhelp_db_proto_enumTypes[1] } func (x TaskStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use TaskStatus.Descriptor instead. func (TaskStatus) EnumDescriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{1} } // 每日聊天总结状态 type ChatSummaryState int32 const ( ChatSummaryState_ChatSummaryState_Pending ChatSummaryState = 0 // 入队等待 ChatSummaryState_ChatSummaryState_Processing ChatSummaryState = 1 // AI 处理中 ChatSummaryState_ChatSummaryState_Done ChatSummaryState = 2 // 完成 ChatSummaryState_ChatSummaryState_Failed ChatSummaryState = 3 // 失败 ) // Enum value maps for ChatSummaryState. var ( ChatSummaryState_name = map[int32]string{ 0: "ChatSummaryState_Pending", 1: "ChatSummaryState_Processing", 2: "ChatSummaryState_Done", 3: "ChatSummaryState_Failed", } ChatSummaryState_value = map[string]int32{ "ChatSummaryState_Pending": 0, "ChatSummaryState_Processing": 1, "ChatSummaryState_Done": 2, "ChatSummaryState_Failed": 3, } ) func (x ChatSummaryState) Enum() *ChatSummaryState { p := new(ChatSummaryState) *p = x return p } func (x ChatSummaryState) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ChatSummaryState) Descriptor() protoreflect.EnumDescriptor { return file_allhelp_allhelp_db_proto_enumTypes[2].Descriptor() } func (ChatSummaryState) Type() protoreflect.EnumType { return &file_allhelp_allhelp_db_proto_enumTypes[2] } func (x ChatSummaryState) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use ChatSummaryState.Descriptor instead. func (ChatSummaryState) EnumDescriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{2} } // 用户任务记录表(仅记录,不做自动触发) type DBTask struct { state protoimpl.MessageState `protogen:"open.v1"` Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" gorm:"primaryKey;autoIncrement"` //@go_tags(`gorm:"primaryKey;autoIncrement" json:"id"`) 主键自增 Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" gorm:"size:50;index"` //@go_tags(`gorm:"size:50;index" json:"uid"`) 用户ID TaskName string `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name" gorm:"size:100"` //@go_tags(`gorm:"size:100" json:"task_name"`) 任务标题 TaskDesc string `protobuf:"bytes,4,opt,name=task_desc,json=taskDesc,proto3" json:"task_desc" gorm:"size:500"` //@go_tags(`gorm:"size:500" json:"task_desc"`) 任务描述 TaskType TaskType `protobuf:"varint,5,opt,name=task_type,json=taskType,proto3,enum=TaskType" json:"task_type" gorm:"default:0"` //@go_tags(`gorm:"default:0" json:"task_type"`) 任务类型(仅记录用户选择) TriggerTime string `protobuf:"bytes,6,opt,name=trigger_time,json=triggerTime,proto3" json:"trigger_time" gorm:"size:40;index"` //@go_tags(`gorm:"size:40;index" json:"trigger_time"`) 用户希望的提醒时间(带时区的RFC3339字符串,如 2025-04-08T15:00:00+08:00) CronExpr string `protobuf:"bytes,7,opt,name=cron_expr,json=cronExpr,proto3" json:"cron_expr" gorm:"size:100"` //@go_tags(`gorm:"size:100" json:"cron_expr"`) cron表达式 CreateTime int64 `protobuf:"varint,8,opt,name=create_time,json=createTime,proto3" json:"create_time" gorm:"index"` //@go_tags(`gorm:"index" json:"create_time"`) 创建时间 UpdateTime int64 `protobuf:"varint,9,opt,name=update_time,json=updateTime,proto3" json:"update_time"` //@go_tags(`json:"update_time"`) 更新时间 FinishTime int64 `protobuf:"varint,10,opt,name=finish_time,json=finishTime,proto3" json:"finish_time" gorm:"index"` //@go_tags(`gorm:"index" json:"finish_time"`) 完成时间 Status TaskStatus `protobuf:"varint,11,opt,name=status,proto3,enum=TaskStatus" json:"status" gorm:"default:0;index"` //@go_tags(`gorm:"default:0;index" json:"status"`) 任务状态 Extra string `protobuf:"bytes,12,opt,name=extra,proto3" json:"extra" gorm:"size:2000"` //@go_tags(`gorm:"size:2000" json:"extra"`) 扩展信息JSON unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DBTask) Reset() { *x = DBTask{} mi := &file_allhelp_allhelp_db_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DBTask) String() string { return protoimpl.X.MessageStringOf(x) } func (*DBTask) ProtoMessage() {} func (x *DBTask) ProtoReflect() protoreflect.Message { mi := &file_allhelp_allhelp_db_proto_msgTypes[0] 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 DBTask.ProtoReflect.Descriptor instead. func (*DBTask) Descriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{0} } func (x *DBTask) GetId() uint64 { if x != nil { return x.Id } return 0 } func (x *DBTask) GetUid() string { if x != nil { return x.Uid } return "" } func (x *DBTask) GetTaskName() string { if x != nil { return x.TaskName } return "" } func (x *DBTask) GetTaskDesc() string { if x != nil { return x.TaskDesc } return "" } func (x *DBTask) GetTaskType() TaskType { if x != nil { return x.TaskType } return TaskType_TaskType_Once } func (x *DBTask) GetTriggerTime() string { if x != nil { return x.TriggerTime } return "" } func (x *DBTask) GetCronExpr() string { if x != nil { return x.CronExpr } return "" } func (x *DBTask) GetCreateTime() int64 { if x != nil { return x.CreateTime } return 0 } func (x *DBTask) GetUpdateTime() int64 { if x != nil { return x.UpdateTime } return 0 } func (x *DBTask) GetFinishTime() int64 { if x != nil { return x.FinishTime } return 0 } func (x *DBTask) GetStatus() TaskStatus { if x != nil { return x.Status } return TaskStatus_TaskStatus_Pending } func (x *DBTask) GetExtra() string { if x != nil { return x.Extra } return "" } // 单条聊天消息(用于入库前拼接上下文) type ChatMsg struct { state protoimpl.MessageState `protogen:"open.v1"` Speaker string `protobuf:"bytes,1,opt,name=speaker,proto3" json:"speaker"` //@go_tags(`json:"speaker"`) 说话人(可为用户昵称或"me"/"him"等) Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content"` //@go_tags(`json:"content"`) 消息内容 Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time"` //@go_tags(`json:"time"`) 消息时间戳(秒级,可选) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ChatMsg) Reset() { *x = ChatMsg{} mi := &file_allhelp_allhelp_db_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ChatMsg) String() string { return protoimpl.X.MessageStringOf(x) } func (*ChatMsg) ProtoMessage() {} func (x *ChatMsg) ProtoReflect() protoreflect.Message { mi := &file_allhelp_allhelp_db_proto_msgTypes[1] 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 ChatMsg.ProtoReflect.Descriptor instead. func (*ChatMsg) Descriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{1} } func (x *ChatMsg) GetSpeaker() string { if x != nil { return x.Speaker } return "" } func (x *ChatMsg) GetContent() string { if x != nil { return x.Content } return "" } func (x *ChatMsg) GetTime() int64 { if x != nil { return x.Time } return 0 } // 用户每日聊天总结表 // 唯一约束: (uid, summary_date) 同一用户同一天仅保留一条记录,重复提交按覆盖重算 type DBChatSummary struct { state protoimpl.MessageState `protogen:"open.v1"` Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" gorm:"primaryKey;autoIncrement"` //@go_tags(`gorm:"primaryKey;autoIncrement" json:"id"`) Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" gorm:"size:50;uniqueIndex:idx_chatsum_uid_date,priority:1"` //@go_tags(`gorm:"size:50;uniqueIndex:idx_chatsum_uid_date,priority:1" json:"uid"`) 用户ID SummaryDate string `protobuf:"bytes,3,opt,name=summary_date,json=summaryDate,proto3" json:"summary_date" gorm:"size:10;uniqueIndex:idx_chatsum_uid_date,priority:2;index"` //@go_tags(`gorm:"size:10;uniqueIndex:idx_chatsum_uid_date,priority:2;index" json:"summary_date"`) 总结日期 YYYY-MM-DD ChatContent string `protobuf:"bytes,4,opt,name=chat_content,json=chatContent,proto3" json:"chat_content" gorm:"type:longtext"` //@go_tags(`gorm:"type:longtext" json:"chat_content"`) 拼接后的聊天内容(服务端由 ChatMsg 列表拼接) ChatMsgs string `protobuf:"bytes,5,opt,name=chat_msgs,json=chatMsgs,proto3" json:"chat_msgs" gorm:"type:longtext"` //@go_tags(`gorm:"type:longtext" json:"chat_msgs"`) 原始 ChatMsg JSON(便于回查) Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary" gorm:"type:longtext"` //@go_tags(`gorm:"type:longtext" json:"summary"`) AI 生成的总结 State ChatSummaryState `protobuf:"varint,7,opt,name=state,proto3,enum=ChatSummaryState" json:"state" gorm:"default:0;index"` //@go_tags(`gorm:"default:0;index" json:"state"`) 状态 ErrorMsg string `protobuf:"bytes,8,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg" gorm:"size:500"` //@go_tags(`gorm:"size:500" json:"error_msg"`) 失败原因 CreateTime int64 `protobuf:"varint,9,opt,name=create_time,json=createTime,proto3" json:"create_time" gorm:"index"` //@go_tags(`gorm:"index" json:"create_time"`) UpdateTime int64 `protobuf:"varint,10,opt,name=update_time,json=updateTime,proto3" json:"update_time"` //@go_tags(`json:"update_time"`) FinishTime int64 `protobuf:"varint,11,opt,name=finish_time,json=finishTime,proto3" json:"finish_time" gorm:"index"` //@go_tags(`gorm:"index" json:"finish_time"`) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DBChatSummary) Reset() { *x = DBChatSummary{} mi := &file_allhelp_allhelp_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DBChatSummary) String() string { return protoimpl.X.MessageStringOf(x) } func (*DBChatSummary) ProtoMessage() {} func (x *DBChatSummary) ProtoReflect() protoreflect.Message { mi := &file_allhelp_allhelp_db_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 DBChatSummary.ProtoReflect.Descriptor instead. func (*DBChatSummary) Descriptor() ([]byte, []int) { return file_allhelp_allhelp_db_proto_rawDescGZIP(), []int{2} } func (x *DBChatSummary) GetId() uint64 { if x != nil { return x.Id } return 0 } func (x *DBChatSummary) GetUid() string { if x != nil { return x.Uid } return "" } func (x *DBChatSummary) GetSummaryDate() string { if x != nil { return x.SummaryDate } return "" } func (x *DBChatSummary) GetChatContent() string { if x != nil { return x.ChatContent } return "" } func (x *DBChatSummary) GetChatMsgs() string { if x != nil { return x.ChatMsgs } return "" } func (x *DBChatSummary) GetSummary() string { if x != nil { return x.Summary } return "" } func (x *DBChatSummary) GetState() ChatSummaryState { if x != nil { return x.State } return ChatSummaryState_ChatSummaryState_Pending } func (x *DBChatSummary) GetErrorMsg() string { if x != nil { return x.ErrorMsg } return "" } func (x *DBChatSummary) GetCreateTime() int64 { if x != nil { return x.CreateTime } return 0 } func (x *DBChatSummary) GetUpdateTime() int64 { if x != nil { return x.UpdateTime } return 0 } func (x *DBChatSummary) GetFinishTime() int64 { if x != nil { return x.FinishTime } return 0 } var File_allhelp_allhelp_db_proto protoreflect.FileDescriptor const file_allhelp_allhelp_db_proto_rawDesc = "" + "\n" + "\x18allhelp/allhelp_db.proto\"\xea\x02\n" + "\x06DBTask\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12\x10\n" + "\x03uid\x18\x02 \x01(\tR\x03uid\x12\x1b\n" + "\ttask_name\x18\x03 \x01(\tR\btaskName\x12\x1b\n" + "\ttask_desc\x18\x04 \x01(\tR\btaskDesc\x12&\n" + "\ttask_type\x18\x05 \x01(\x0e2\t.TaskTypeR\btaskType\x12!\n" + "\ftrigger_time\x18\x06 \x01(\tR\vtriggerTime\x12\x1b\n" + "\tcron_expr\x18\a \x01(\tR\bcronExpr\x12\x1f\n" + "\vcreate_time\x18\b \x01(\x03R\n" + "createTime\x12\x1f\n" + "\vupdate_time\x18\t \x01(\x03R\n" + "updateTime\x12\x1f\n" + "\vfinish_time\x18\n" + " \x01(\x03R\n" + "finishTime\x12#\n" + "\x06status\x18\v \x01(\x0e2\v.TaskStatusR\x06status\x12\x14\n" + "\x05extra\x18\f \x01(\tR\x05extra\"Q\n" + "\aChatMsg\x12\x18\n" + "\aspeaker\x18\x01 \x01(\tR\aspeaker\x12\x18\n" + "\acontent\x18\x02 \x01(\tR\acontent\x12\x12\n" + "\x04time\x18\x03 \x01(\x03R\x04time\"\xd7\x02\n" + "\rDBChatSummary\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12\x10\n" + "\x03uid\x18\x02 \x01(\tR\x03uid\x12!\n" + "\fsummary_date\x18\x03 \x01(\tR\vsummaryDate\x12!\n" + "\fchat_content\x18\x04 \x01(\tR\vchatContent\x12\x1b\n" + "\tchat_msgs\x18\x05 \x01(\tR\bchatMsgs\x12\x18\n" + "\asummary\x18\x06 \x01(\tR\asummary\x12'\n" + "\x05state\x18\a \x01(\x0e2\x11.ChatSummaryStateR\x05state\x12\x1b\n" + "\terror_msg\x18\b \x01(\tR\berrorMsg\x12\x1f\n" + "\vcreate_time\x18\t \x01(\x03R\n" + "createTime\x12\x1f\n" + "\vupdate_time\x18\n" + " \x01(\x03R\n" + "updateTime\x12\x1f\n" + "\vfinish_time\x18\v \x01(\x03R\n" + "finishTime*o\n" + "\bTaskType\x12\x11\n" + "\rTaskType_Once\x10\x00\x12\x12\n" + "\x0eTaskType_Daily\x10\x01\x12\x13\n" + "\x0fTaskType_Weekly\x10\x02\x12\x14\n" + "\x10TaskType_Monthly\x10\x03\x12\x11\n" + "\rTaskType_Cron\x10\x04*X\n" + "\n" + "TaskStatus\x12\x16\n" + "\x12TaskStatus_Pending\x10\x00\x12\x18\n" + "\x14TaskStatus_Completed\x10\x02\x12\x18\n" + "\x14TaskStatus_Cancelled\x10\x03*\x89\x01\n" + "\x10ChatSummaryState\x12\x1c\n" + "\x18ChatSummaryState_Pending\x10\x00\x12\x1f\n" + "\x1bChatSummaryState_Processing\x10\x01\x12\x19\n" + "\x15ChatSummaryState_Done\x10\x02\x12\x1b\n" + "\x17ChatSummaryState_Failed\x10\x03B\x06Z\x04.;pbb\x06proto3" var ( file_allhelp_allhelp_db_proto_rawDescOnce sync.Once file_allhelp_allhelp_db_proto_rawDescData []byte ) func file_allhelp_allhelp_db_proto_rawDescGZIP() []byte { file_allhelp_allhelp_db_proto_rawDescOnce.Do(func() { file_allhelp_allhelp_db_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_allhelp_allhelp_db_proto_rawDesc), len(file_allhelp_allhelp_db_proto_rawDesc))) }) return file_allhelp_allhelp_db_proto_rawDescData } var file_allhelp_allhelp_db_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_allhelp_allhelp_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_allhelp_allhelp_db_proto_goTypes = []any{ (TaskType)(0), // 0: TaskType (TaskStatus)(0), // 1: TaskStatus (ChatSummaryState)(0), // 2: ChatSummaryState (*DBTask)(nil), // 3: DBTask (*ChatMsg)(nil), // 4: ChatMsg (*DBChatSummary)(nil), // 5: DBChatSummary } var file_allhelp_allhelp_db_proto_depIdxs = []int32{ 0, // 0: DBTask.task_type:type_name -> TaskType 1, // 1: DBTask.status:type_name -> TaskStatus 2, // 2: DBChatSummary.state:type_name -> ChatSummaryState 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_allhelp_allhelp_db_proto_init() } func file_allhelp_allhelp_db_proto_init() { if File_allhelp_allhelp_db_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_allhelp_allhelp_db_proto_rawDesc), len(file_allhelp_allhelp_db_proto_rawDesc)), NumEnums: 3, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, GoTypes: file_allhelp_allhelp_db_proto_goTypes, DependencyIndexes: file_allhelp_allhelp_db_proto_depIdxs, EnumInfos: file_allhelp_allhelp_db_proto_enumTypes, MessageInfos: file_allhelp_allhelp_db_proto_msgTypes, }.Build() File_allhelp_allhelp_db_proto = out.File file_allhelp_allhelp_db_proto_goTypes = nil file_allhelp_allhelp_db_proto_depIdxs = nil }