diff --git a/protos/generic/filter.proto b/protos/generic/filter.proto new file mode 100644 index 0000000..2e5a26c --- /dev/null +++ b/protos/generic/filter.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +option go_package = "./;generated"; + +package generic; + +// Pagination options. +message Pagination { + int32 page = 1; // The page number. + int32 length = 2; // The number of items per page. +} + +// Sorting options. +message Sort { + string field = 1; // The field to sort by. + string direction = 2; // The sort direction (e.g., ASC, DESC). +} \ No newline at end of file diff --git a/protos/generic/list.proto b/protos/generic/list.proto new file mode 100644 index 0000000..9363fa6 --- /dev/null +++ b/protos/generic/list.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +option go_package = "./;generated"; + +package generic; + +// Pagination metadata. +message PaginationInfo { + int32 count = 1; // Total number of items. +} \ No newline at end of file