35 lines
787 B
TypeScript
35 lines
787 B
TypeScript
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;
|
||
}
|