From 3889334e3f648e71d0d6ef25fb9595f47d3fae0c Mon Sep 17 00:00:00 2001 From: Yared Yemane Date: Tue, 14 Apr 2026 08:42:19 -0700 Subject: [PATCH] query fix --- gen/db/hierarchy.sql.go | 10 +++++----- gen/db/models.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gen/db/hierarchy.sql.go b/gen/db/hierarchy.sql.go index 4468a61..600458f 100644 --- a/gen/db/hierarchy.sql.go +++ b/gen/db/hierarchy.sql.go @@ -225,7 +225,7 @@ INSERT INTO sub_module_practices ( is_active ) VALUES ($1, $2, $3, $4, $5, $6, COALESCE($7, 0), COALESCE($8, TRUE)) -RETURNING id, sub_module_id, title, description, thumbnail, intro_video_url, question_set_id, display_order, is_active, created_at +RETURNING id, sub_module_id, question_set_id, intro_video_url, display_order, is_active, created_at, title, description, thumbnail ` type CreateSubModulePracticeParams struct { @@ -254,14 +254,14 @@ func (q *Queries) CreateSubModulePractice(ctx context.Context, arg CreateSubModu err := row.Scan( &i.ID, &i.SubModuleID, - &i.Title, - &i.Description, - &i.Thumbnail, - &i.IntroVideoUrl, &i.QuestionSetID, + &i.IntroVideoUrl, &i.DisplayOrder, &i.IsActive, &i.CreatedAt, + &i.Title, + &i.Description, + &i.Thumbnail, ) return i, err } diff --git a/gen/db/models.go b/gen/db/models.go index 7126a70..6a1cdaa 100644 --- a/gen/db/models.go +++ b/gen/db/models.go @@ -368,14 +368,14 @@ type SubModuleLesson struct { type SubModulePractice struct { ID int64 `json:"id"` SubModuleID int64 `json:"sub_module_id"` - Title string `json:"title"` - Description pgtype.Text `json:"description"` - Thumbnail pgtype.Text `json:"thumbnail"` - IntroVideoUrl pgtype.Text `json:"intro_video_url"` QuestionSetID int64 `json:"question_set_id"` + IntroVideoUrl pgtype.Text `json:"intro_video_url"` DisplayOrder int32 `json:"display_order"` IsActive bool `json:"is_active"` CreatedAt pgtype.Timestamptz `json:"created_at"` + Title string `json:"title"` + Description pgtype.Text `json:"description"` + Thumbnail pgtype.Text `json:"thumbnail"` } type SubModuleVideo struct {