mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
refactor: add Pagination class
This commit is contained in:
1 parent
19cd10ab7b
commit
68db16419d
9 files changed
+99
-89
No files matched your search
@@ -1,23 +0,0 @@
|
||||
/* eslint-disable class-methods-use-this */
|
||||
// eslint-disable-next-line max-classes-per-file
|
||||
class Order {}
|
||||
|
||||
export class Asc extends Order {
|
||||
matchStage(nextKey) {
|
||||
return { $gt: nextKey }
|
||||
}
|
||||
|
||||
order() {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
export class Desc extends Order {
|
||||
matchStage(nextKey) {
|
||||
return { $lt: nextKey }
|
||||
}
|
||||
|
||||
order() {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user