ordered models for lessons and units

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-20 04:39:28 +08:00
parent 2c70f4714e
commit 565a32477a
4 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ const Lesson = sequelize.define("Lesson", {
uuid: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4, allowNull: false, unique: true, hidden: true, order: 0 },
title: { type: DataTypes.STRING(255), allowNull: false, label: "Title", hidden: false, order: 1 },
description: { type: DataTypes.TEXT, allowNull: true, label: "Description", hidden: true, order: 2 },
// order 2 is reserved for the computed "Affiliated" (course_count) column, order 3 for computed "Course Status" — see LESSON_LIST_COMPUTED in lessons.controller.js
description: { type: DataTypes.TEXT, allowNull: true, label: "Description", hidden: true, order: 0 },
duration_seconds: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 }, // computed from blocks on save