|
|
package domain
|
|
|
|
|
|
import "time"
|
|
|
import (
|
|
|
"context"
|
|
|
"time"
|
|
|
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
|
|
|
)
|
|
|
|
|
|
// 文章段落
|
|
|
type ArticleSection struct {
|
|
|
Id int
|
|
|
Id int64
|
|
|
UpdatedAt time.Time // 更新时间
|
|
|
DeletedAt *time.Time //
|
|
|
CreatedAt time.Time //
|
|
|
ArticleId int // 文章id
|
|
|
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)
|
|
|
} |
...
|
...
|
|