59 lines
951 B
TypeScript
59 lines
951 B
TypeScript
export type TNews = {
|
|
title: string
|
|
description: string
|
|
items: Pick<
|
|
TNewsDetail,
|
|
'title' | 'content' | 'featured' | 'slug' | 'tags' | 'isPremium'
|
|
>[]
|
|
}
|
|
|
|
export type TNewsDetail = {
|
|
title: string
|
|
content: string
|
|
featured: string
|
|
author: string
|
|
date: Date
|
|
slug: string
|
|
tags?: Array<string>
|
|
isPremium?: boolean
|
|
categories?: Array<string>
|
|
}
|
|
|
|
export type TTag = {
|
|
id: string
|
|
code: string
|
|
name: string
|
|
created_at: string
|
|
updated_at: string
|
|
}
|
|
|
|
export type TCategory = {
|
|
id: string
|
|
name: string
|
|
code: string
|
|
created_at: string
|
|
updated_at: string
|
|
}
|
|
|
|
export type Author = {
|
|
id: string
|
|
name: string
|
|
profile_picture: string
|
|
}
|
|
|
|
export type TKontents = {
|
|
id: string
|
|
title: string
|
|
content: string
|
|
featured_image: string
|
|
tags: TTag[]
|
|
categories: TCategory[]
|
|
is_premium: boolean
|
|
slug: string
|
|
author_id: string
|
|
live_at: string
|
|
created_at: string
|
|
updated_at: string
|
|
author: Author
|
|
}
|