From 877ec0dd89381d71701e533447d29bcf50304147 Mon Sep 17 00:00:00 2001 From: harold Date: Fri, 25 Apr 2025 11:35:24 +0500 Subject: [PATCH] add fix --- internal/docs/docs.go | 5 +++++ internal/docs/swagger.json | 5 +++++ internal/docs/swagger.yaml | 4 ++++ internal/model/models.go | 1 + internal/model/sql/query.go | 1 + 5 files changed, 16 insertions(+) diff --git a/internal/docs/docs.go b/internal/docs/docs.go index 0d8f088..4fd0a0c 100644 --- a/internal/docs/docs.go +++ b/internal/docs/docs.go @@ -1626,6 +1626,11 @@ const docTemplate = `{ "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, + "paid_time": { + "type": "string", + "format": "date-time", + "example": "2025-03-12T15:05:10Z" + }, "play_content": { "type": "boolean", "example": true diff --git a/internal/docs/swagger.json b/internal/docs/swagger.json index 92c6890..e34b3c4 100644 --- a/internal/docs/swagger.json +++ b/internal/docs/swagger.json @@ -1619,6 +1619,11 @@ "format": "uuid", "example": "550e8400-e29b-41d4-a716-446655440000" }, + "paid_time": { + "type": "string", + "format": "date-time", + "example": "2025-03-12T15:05:10Z" + }, "play_content": { "type": "boolean", "example": true diff --git a/internal/docs/swagger.yaml b/internal/docs/swagger.yaml index a0c064d..8638bb9 100644 --- a/internal/docs/swagger.yaml +++ b/internal/docs/swagger.yaml @@ -97,6 +97,10 @@ definitions: example: 550e8400-e29b-41d4-a716-446655440000 format: uuid type: string + paid_time: + example: "2025-03-12T15:05:10Z" + format: date-time + type: string play_content: example: true type: boolean diff --git a/internal/model/models.go b/internal/model/models.go index 980d554..467ef8a 100644 --- a/internal/model/models.go +++ b/internal/model/models.go @@ -78,6 +78,7 @@ type Donat struct { ShowText bool `db:"show_text" json:"show_text" example:"true" description:"Whether to show the donation message"` PlayContent bool `db:"play_content" json:"play_content" example:"true" description:"Whether to play media content (e.g., TTS, sound)"` ShowedTime *time.Time `db:"showed_time" json:"showed_time" format:"date-time" example:"2025-03-12T15:05:10Z" description:"Timestamp when the donation was displayed on stream"` + Paid *time.Time `db:"paid_time" json:"paid_time" format:"date-time" example:"2025-03-12T15:05:10Z" description:"Timestamp when the donation was paid"` CreatedAt time.Time `db:"created_at" json:"-" format:"date-time" example:"2025-03-12T15:04:05Z" description:"Timestamp when the donation was created"` UpdatedAt time.Time `db:"updated_at" json:"-" format:"date-time" example:"2025-03-12T15:04:05Z" description:"Timestamp when the donation was last updated"` } diff --git a/internal/model/sql/query.go b/internal/model/sql/query.go index cac9b58..864fa65 100644 --- a/internal/model/sql/query.go +++ b/internal/model/sql/query.go @@ -68,6 +68,7 @@ SELECT accepted_time, show_name, show_text, + paid_time, play_content, showed_time, created_at,