feat(blog): add IArticlesRepository interface
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
import type { Article } from "@/entities/article";
|
||||||
|
|
||||||
|
export interface IArticlesRepository {
|
||||||
|
getArticle(id: string): Promise<Article | undefined>;
|
||||||
|
getArticleBySlug(slug: string): Promise<Article | undefined>;
|
||||||
|
getArticles(options?: {
|
||||||
|
status?: string;
|
||||||
|
authorId?: string;
|
||||||
|
limit?: number;
|
||||||
|
offset?: number;
|
||||||
|
}): Promise<Article[]>;
|
||||||
|
createArticle(input: Article): Promise<Article>;
|
||||||
|
updateArticle(
|
||||||
|
id: string,
|
||||||
|
input: Partial<Article>,
|
||||||
|
): Promise<Article | undefined>;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user