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:
parent
8b5a4640c1
commit
2f0c2f8b7c
@ -186,4 +186,11 @@ export const FilesTypeForMachine = pgTable("f_type_for_machines", {
|
||||
.notNull()
|
||||
.references(() => FilesTypesTable.id),
|
||||
});
|
||||
export type IFilesTypeForMachine = typeof FilesTypeForMachine.$inferSelect
|
||||
export type IFilesTypeForMachine = typeof FilesTypeForMachine.$inferSelect
|
||||
|
||||
export interface IWithCount<T> {
|
||||
count: number;
|
||||
limit: number;
|
||||
currentOffset: number;
|
||||
data: T
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user