feat: add createdAt and updatedAt fields to Article model and implement article pagination with new components
This commit is contained in:
@@ -29,6 +29,8 @@ export const ArticleModel = z.object({
|
||||
content: z.string(),
|
||||
authorId: z.string(),
|
||||
externalId: z.uuid(),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date(),
|
||||
});
|
||||
export type ArticleModel = z.infer<typeof ArticleModel>;
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ export const articleEntityToModel = (
|
||||
content: articleEntity.content,
|
||||
authorId: articleEntity.authorId,
|
||||
externalId: articleEntity.externalId,
|
||||
createdAt: articleEntity.createdAt,
|
||||
updatedAt: articleEntity.updatedAt,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user