From c713416a9166bd13f212a7573dbd58975233a671 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 19 Mar 2025 18:15:17 +0800 Subject: [PATCH] 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. --- core/constants/common.go | 2 +- core/entity/sort.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/constants/common.go b/core/constants/common.go index 5c482275..442d4ecf 100644 --- a/core/constants/common.go +++ b/core/constants/common.go @@ -2,5 +2,5 @@ package constants const ( ASCENDING = "asc" - DESCENDING = "dsc" + DESCENDING = "desc" ) diff --git a/core/entity/sort.go b/core/entity/sort.go index 482dc6c8..bb9dcbd9 100644 --- a/core/entity/sort.go +++ b/core/entity/sort.go @@ -2,5 +2,5 @@ package entity type Sort struct { Key string `json:"key"` - Direction string `json:"d"` + Direction string `json:"direction"` }