first commit
This commit is contained in:
50
types/post.ts
Normal file
50
types/post.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
// Post ile ilişkili tag tipi
|
||||
export interface Tag {
|
||||
ID: number;
|
||||
name: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
// Post ile ilişkili kategori tipi
|
||||
export interface Category {
|
||||
ID: number;
|
||||
title: string;
|
||||
slug: string;
|
||||
description?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
// Tekil post tipi
|
||||
export interface Post {
|
||||
ID: number;
|
||||
title: string;
|
||||
content: string;
|
||||
slug: string;
|
||||
images: string; // tam boyut resim
|
||||
images_mid: string; // orta boyut resim
|
||||
images_min: string; // kucuk (thumbnail) resim
|
||||
width: number;
|
||||
height: number;
|
||||
quality: number;
|
||||
format: string;
|
||||
categories: Category[];
|
||||
tags: Tag[];
|
||||
CreatedAt?: string;
|
||||
UpdatedAt?: string;
|
||||
DeletedAt?: string | null;
|
||||
}
|
||||
|
||||
// API'dan dönen sayfalama meta bilgisi
|
||||
export interface PostMeta {
|
||||
page: number;
|
||||
per_page: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
// /api/v1/posts endpoint'inin tam response tipi
|
||||
export interface PostResponse {
|
||||
data: Post[];
|
||||
meta: PostMeta;
|
||||
}
|
||||
Reference in New Issue
Block a user