fix: improvement logs and record news access

This commit is contained in:
ericprd
2025-03-20 11:11:08 +08:00
parent 290d7f6701
commit d8f6968f64
13 changed files with 81 additions and 25 deletions
+5 -4
View File
@@ -9,10 +9,11 @@ type LogsRequest struct {
}
type LogsSpec struct {
ContentID string `json:"content_id" validate:"required"`
IP *string `json:"ip"`
UserID *string `json:"user_id"`
UserAgent *string `json:"user_agent"`
ContentID string `json:"content_id" validate:"required"`
IP *string
UserID *string
UserAgent *string
Category string
}
type LogResponse struct {
+1
View File
@@ -35,6 +35,7 @@ type News struct {
LiveAt time.Time `json:"live_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Clicked int64 `json:"clicked"`
Author Staff `json:"author"`
}