first commit
This commit is contained in:
34
frontend/types/post.ts
Normal file
34
frontend/types/post.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Category } from "./category";
|
||||
import { Tag } from "./tag";
|
||||
|
||||
export interface Post {
|
||||
id?: number; // normalized id (frontend kullanım)
|
||||
ID?: number; // GORM model ID (backend JSON)
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
deleted_at?: string | null;
|
||||
CreatedAt?: string; // GORM model timestamp alanları
|
||||
UpdatedAt?: string;
|
||||
DeletedAt?: string | null;
|
||||
title: string;
|
||||
slug: string;
|
||||
content: string;
|
||||
images: string;
|
||||
width: number;
|
||||
height: number;
|
||||
quality: number;
|
||||
format: string;
|
||||
categories?: Category[];
|
||||
tags?: Tag[];
|
||||
}
|
||||
|
||||
export interface PostListResponse {
|
||||
items: Post[];
|
||||
page: number;
|
||||
per_page: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface PostDetailResponse {
|
||||
data: Post;
|
||||
}
|
||||
Reference in New Issue
Block a user