Browse Source

refactor(api): 调整 CCListResponse 结构体字段标签

- 为 CCListResponse 结构体的各个字段添加 gorm 标签
- 将 CreatedAt 和 ExpiredAt 字段类型从 string 改为 int64
- 修正 SourceUrl 字段
fusu 3 weeks ago
parent
commit
f879afd0bc
1 changed files with 6 additions and 6 deletions
  1. 6 6
      api/v1/cc.go

+ 6 - 6
api/v1/cc.go

@@ -8,12 +8,12 @@ type CCListRequest struct {
 
 
 
 
 type CCListResponse struct {
 type CCListResponse struct {
-	Value string `json:"value" form:"value"`
-	Type string `json:"type" form:"type"`
-	Reason string `json:"reason" form:"reason"`
-	SourceUrl string `json:"sourceURL" form:"sourceURL"`
-	CreatedAt string `json:"createdAt" form:"createdAt"`
-	ExpiredAt string `json:"expiredAt" form:"expiredAt"`
+	Value string `json:"value" form:"value" gorm:"value"`
+	Type string `json:"type" form:"type" gorm:"type"`
+	Reason string `json:"reason" form:"reason" gorm:"reason"`
+	SourceURL string `json:"sourceURL" form:"sourceURL" gorm:"sourceURL"`
+	CreatedAt int64 `json:"createdAt" form:"createdAt" gorm:"createdAt"`
+	ExpiredAt int64 `json:"expiredAt" form:"expiredAt" gorm:"expiredAt"`
 }
 }
 
 
 type CCStateRequest struct {
 type CCStateRequest struct {