article_section.go
1017 字节
package domain
import (
"context"
"time"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
)
// 文章段落
type ArticleSection struct {
Id int64
UpdatedAt time.Time // 更新时间
DeletedAt *time.Time //
CreatedAt time.Time //
ArticleId int64 // 文章id
Content string // 文本内容
SortBy int // 排序
TotalComment int // 评论的数量
// ...more
}
type ArticleSectionRepository interface {
Insert(ctx context.Context, conn transaction.Conn, dm *ArticleSection) (*ArticleSection, error)
Update(ctx context.Context, conn transaction.Conn, dm *Article) (*ArticleSection, error)
Delete(ctx context.Context, conn transaction.Conn, dm *ArticleSection) (*ArticleSection, error)
FindOne(ctx context.Context, conn transaction.Conn, id int64) (*ArticleSection, error)
Find(ctx context.Context, conn transaction.Conn, queryOptions map[string]interface{}) (int64, []*ArticleSection, error)
}