|
@@ -14,6 +14,7 @@ type IArticleRepository interface {
|
|
GetByID(ctx context.Context, ID int) (*models.Article, error)
|
|
GetByID(ctx context.Context, ID int) (*models.Article, error)
|
|
Add(ctx context.Context, m models.Article) (int, error)
|
|
Add(ctx context.Context, m models.Article) (int, error)
|
|
Update(ctx context.Context, m models.Article) error
|
|
Update(ctx context.Context, m models.Article) error
|
|
|
|
+ Delete(ctx context.Context, ID int) error
|
|
}
|
|
}
|
|
|
|
|
|
type ITagRepository interface {
|
|
type ITagRepository interface {
|
|
@@ -31,4 +32,5 @@ type ITagRepository interface {
|
|
type IArticleTagRepository interface {
|
|
type IArticleTagRepository interface {
|
|
Add(ctx context.Context, articleID int, tagIDs []int) error
|
|
Add(ctx context.Context, articleID int, tagIDs []int) error
|
|
Delete(ctx context.Context, articleID int, tagIDs []int) error
|
|
Delete(ctx context.Context, articleID int, tagIDs []int) error
|
|
|
|
+ DeleteByArticleID(ctx context.Context, articleID int) error
|
|
}
|
|
}
|