chat_session.go
1.2 KB
package domain
import (
"context"
"gitlab.fjmaimaimai.com/allied-creation/su-micro/pkg/transaction"
)
type ChatSession struct {
Id int64 `json:",omitempty"` // 唯一标识
CompanyId int64 `json:",omitempty"` // 公司ID
UserId int64 `json:",omitempty"` // 用户ID
Title string `json:",omitempty"` // 会话标题
Abstract string `json:",omitempty"` // 摘要
CreatedAt int64 `json:",omitempty"`
UpdatedAt int64 `json:",omitempty"`
DeletedAt int64 `json:",omitempty"`
Version int `json:",omitempty"`
}
type ChatSessionRepository interface {
Insert(ctx context.Context, conn transaction.Conn, dm *ChatSession) (*ChatSession, error)
Update(ctx context.Context, conn transaction.Conn, dm *ChatSession) (*ChatSession, error)
UpdateWithVersion(ctx context.Context, conn transaction.Conn, dm *ChatSession) (*ChatSession, error)
Delete(ctx context.Context, conn transaction.Conn, dm *ChatSession) (*ChatSession, error)
FindOne(ctx context.Context, conn transaction.Conn, id int64) (*ChatSession, error)
FindOneUnscoped(ctx context.Context, conn transaction.Conn, id int64) (*ChatSession, error)
Find(ctx context.Context, conn transaction.Conn, queryOptions map[string]interface{}) (int64, []*ChatSession, error)
}