feat(blog): add IArticlesRepository interface

This commit is contained in:
2026-05-04 22:11:17 +02:00
parent 692ee58365
commit ab11f42e8d

View File

@@ -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>;
}