mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-30 03:03:13 +08:00
Add order by
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
package ai.chat2db.server.domain.api.param.datasource;
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.OrderBy;
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author moji
|
||||
@ -23,4 +24,16 @@ public class DataSourcePageQueryParam extends PageQueryParam {
|
||||
* @see ai.chat2db.server.domain.api.enums.DataSourceKindEnum
|
||||
*/
|
||||
private String kind;
|
||||
|
||||
@Getter
|
||||
public enum OrderCondition implements ai.chat2db.server.tools.base.wrapper.param.OrderCondition {
|
||||
ID_DESC(OrderBy.desc("id")),
|
||||
;
|
||||
|
||||
final OrderBy orderBy;
|
||||
|
||||
OrderCondition(OrderBy orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package ai.chat2db.server.domain.api.param.team;
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.OrderBy;
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* page query
|
||||
@ -16,4 +18,15 @@ public class TeamPageQueryParam extends PageQueryParam {
|
||||
*/
|
||||
private String searchKey;
|
||||
|
||||
@Getter
|
||||
public enum OrderCondition implements ai.chat2db.server.tools.base.wrapper.param.OrderCondition {
|
||||
ID_DESC(OrderBy.desc("id")),
|
||||
;
|
||||
|
||||
final OrderBy orderBy;
|
||||
|
||||
OrderCondition(OrderBy orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
package ai.chat2db.server.domain.api.param.user;
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.OrderBy;
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@ -21,4 +23,16 @@ public class UserPageQueryParam extends PageQueryParam {
|
||||
* searchKey
|
||||
*/
|
||||
private String searchKey;
|
||||
|
||||
@Getter
|
||||
public enum OrderCondition implements ai.chat2db.server.tools.base.wrapper.param.OrderCondition {
|
||||
ID_DESC(OrderBy.desc("id")),
|
||||
;
|
||||
|
||||
final OrderBy orderBy;
|
||||
|
||||
OrderCondition(OrderBy orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user