123456789101112131415161718192021222324252627282930 |
- package model
- import (
- "time"
- "gorm.io/gorm"
- )
- const TableNameChatSession = "chat_session"
- type ChatSession struct {
- ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
- CreatedAt time.Time `gorm:"column:created_at;not null;comment:Create Time | 创建日期" json:"created_at"`
- UpdatedAt time.Time `gorm:"column:updated_at;not null;comment:Update Time | 修改日期" json:"updated_at"`
- DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"`
- Name string `gorm:"column:name;comment:会话名称" json:"name"`
- UserID int64 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"`
- BotID int64 `gorm:"column:bot_id;comment:聊天 ID" json:"bot_id"`
- BotType int64 `gorm:"column:bot_type;comment:类型:1-微信 2-小程序 3-智能体" json:"bot_type"`
- }
- func (*ChatSession) TableName() string {
- return TableNameChatSession
- }
|