article_section.go
1.1 KB
package domain
import (
"context"
"time"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
)
// 文章段落
type ArticleSection struct {
Id int64 `json:"id"`
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
DeletedAt *time.Time `json:"deletedAt"` //
CreatedAt time.Time `json:"createdAt"` //
ArticleId int64 `json:"articleId"` // 文章id
Content string `json:"content"` // 文本内容
SortBy int `json:"sortBy"` // 排序
TotalComment int `json:"totalComment"` // 评论的数量
}
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)
}