From f86c79260fff23ae9096a9a0049cf37754e6f309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Tue, 10 Dec 2024 16:10:52 +0100 Subject: [PATCH] track: add CreatedAt, DeletedAt and Last_Update fields (#16) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaƫl Pinson --- instruqt/track.go | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/instruqt/track.go b/instruqt/track.go index 081623f..13fb418 100644 --- a/instruqt/track.go +++ b/instruqt/track.go @@ -47,15 +47,18 @@ type tracksQuery struct { // Track represents the data structure for an Instruqt track. type Track struct { - Slug string // The slug identifier for the track. - Id string // The unique identifier for the track. - Icon string // The icon associated with the track. - Title string // The title of the track. - Description string // The description of the track. - Teaser string // A teaser or short description of the track. - Level string // The difficulty level of the track. - Embed_Token string // The token used for embedding the track. - Statistics struct { // Statistics about the track. + Slug string // The slug identifier for the track. + Id string // The unique identifier for the track. + Icon string // The icon associated with the track. + Title string // The title of the track. + Description string // The description of the track. + Teaser string // A teaser or short description of the track. + Level string // The difficulty level of the track. + Embed_Token string // The token used for embedding the track. + CreatedAt time.Time // Timestamp of when track was created. + DeletedAt time.Time // Timestamp of when track was deleted. + Last_Update time.Time // Timestamp of when track has been last updated. + Statistics struct { // Statistics about the track. Average_review_score float32 // The average review score of the track. } TrackTags []TrackTag // A list of tags associated with the track. @@ -73,15 +76,18 @@ type TrackTag struct { // SandboxTrack represents a track in a sandbox environment, including its details // and associated challenges. type SandboxTrack struct { - Id string // The unique identifier for the sandbox track. - Slug string // The slug identifier for the sandbox track. - Icon string // The icon associated with the sandbox track. - Title string // The title of the sandbox track. - Description string // The description of the sandbox track. - Teaser string // A teaser or short description of the sandbox track. - Level string // The difficulty level of the sandbox track. - Embed_Token string // The token used for embedding the sandbox track. - Statistics struct { // Statistics about the sandbox track. + Id string // The unique identifier for the sandbox track. + Slug string // The slug identifier for the sandbox track. + Icon string // The icon associated with the sandbox track. + Title string // The title of the sandbox track. + Description string // The description of the sandbox track. + Teaser string // A teaser or short description of the sandbox track. + Level string // The difficulty level of the sandbox track. + Embed_Token string // The token used for embedding the sandbox track. + CreatedAt time.Time // Timestamp of when track was created. + DeletedAt time.Time // Timestamp of when track was deleted. + Last_Update time.Time // Timestamp of when track has been last updated. + Statistics struct { // Statistics about the sandbox track. Average_review_score float32 // The average review score of the sandbox track. } TrackTags []struct { // A list of tags associated with the sandbox track.