feat: implement course listing and retrieval API with dedicated controller, service, and types.

This commit is contained in:
JakkrapartXD 2026-01-15 17:57:32 +07:00
parent 4b335b6b49
commit 1aa3190ca4
3 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,26 @@
import { Course, Prisma } from '@prisma/client';
// Use Prisma's CourseCreateInput for creating courses
export interface createCourse {
data: Prisma.CourseCreateInput;
}
// Response type uses Prisma's Course model
export interface createCourseResponse {
code: number;
message: string;
data: Course;
}
export interface listCourseResponse {
code: number;
message: string;
data: Course[];
total: number | null;
}
export interface getCourseResponse {
code: number;
message: string;
data: Course | null;
}