Files
reader/lib/types.ts
T
virtus 75ed8e233b Add moderation APIs and admin UI
Add moderator/admin backend APIs and client features for managing novels and chapters. New endpoints include mod chapter routes (paginated list, single GET, PUT, DELETE, and bulk optimize), mod novel routes (create, GET by id, update, delete), genre CRUD, user bookmarks, novel comments, and rating endpoints. Update EPUB import to use a shared slugify util. Enhance moderator UI: chapter manager gains pagination, bulk optimization preview/apply, edit/delete dialogs; novel client adds genre management and edit/delete flows. Also update Prisma schema, add a DB wipe script, remove unused lib/data.ts, and adjust related types/utils and bookmark context.
2026-03-06 17:30:56 +07:00

64 lines
1.0 KiB
TypeScript

export interface Genre {
id: string
name: string
slug: string
description: string
icon: string
}
export interface Novel {
id: string
title: string
slug: string
authorName: string
coverColor: string
description: string
genres: string[]
status: "Đang ra" | "Hoàn thành" | "Tạm ngưng"
totalChapters: number
views: number
rating: number
ratingCount: number
bookmarkCount: number
lastUpdated: string
createdAt: string
}
export interface Chapter {
id: string
novelId: string
number: number
title: string
content: string
views: number
createdAt: string
}
export interface User {
id: string
username: string
email: string
avatarColor: string
avatarUrl?: string
createdAt: string
}
export interface Comment {
id: string
userId: string
username: string
avatarColor: string
novelId: string
chapterId?: string
content: string
createdAt: string
}
export interface Bookmark {
novelId: string
lastChapterId?: string
lastChapterNumber?: number
addedAt: string
novel?: any
}