refactor: standardize sorting direction constants and JSON annotations

- Updated DESCENDING constant from "dsc" to "desc" for clarity and consistency.
- Changed JSON annotation for Direction field in Sort struct from "d" to "direction" to improve readability and maintainability.
- Ensured alignment with existing coding standards and practices across the codebase.
This commit is contained in:
Marvin Zhang
2025-03-19 18:15:17 +08:00
parent 3d11a14fd8
commit c713416a91
2 changed files with 2 additions and 2 deletions

View File

@@ -2,5 +2,5 @@ package constants
const (
ASCENDING = "asc"
DESCENDING = "dsc"
DESCENDING = "desc"
)

View File

@@ -2,5 +2,5 @@ package entity
type Sort struct {
Key string `json:"key"`
Direction string `json:"d"`
Direction string `json:"direction"`
}