Expose has_practice booleans for LMS and pre-exam hierarchy entities, wire SQL/repository mappings, and regenerate SQLC/Swagger artifacts. Also update the Resend sender display name for outbound emails. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.2 KiB
Go
33 lines
1.2 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
// ExamPrepUnit is a chapter-like grouping under an exam-prep catalog course (schema exam_prep.units).
|
|
type ExamPrepUnit struct {
|
|
ID int64 `json:"id"`
|
|
CatalogCourseID int64 `json:"catalog_course_id"`
|
|
Name string `json:"name"`
|
|
Description *string `json:"description,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
SortOrder int `json:"sort_order"`
|
|
ModulesCount *int64 `json:"modules_count,omitempty"`
|
|
LessonsCount *int64 `json:"lessons_count,omitempty"`
|
|
PracticesCount *int64 `json:"practices_count,omitempty"`
|
|
HasPractice bool `json:"has_practice"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type CreateExamPrepUnitInput struct {
|
|
Name string `json:"name" validate:"required"`
|
|
Description *string `json:"description,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
}
|
|
|
|
type UpdateExamPrepUnitInput struct {
|
|
Name *string `json:"name,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
SortOrder *int `json:"sort_order,omitempty"`
|
|
}
|