Add IWithCount interface to schema.ts

Introduced a new interface IWithCount to handle paginated data responses. It includes properties for count, limit, currentOffset, and a generic data type. This change will aid in standardizing pagination across the application.
This commit is contained in:
Mathis H (Avnyr) 2024-10-17 12:15:58 +02:00
parent 8b5a4640c1
commit 2f0c2f8b7c
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -187,3 +187,10 @@ export const FilesTypeForMachine = pgTable("f_type_for_machines", {
.references(() => FilesTypesTable.id),
});
export type IFilesTypeForMachine = typeof FilesTypeForMachine.$inferSelect
export interface IWithCount<T> {
count: number;
limit: number;
currentOffset: number;
data: T
}