This commit is contained in:
rgrgogu
2026-05-20 13:22:29 +08:00
parent 6907e9bb2d
commit 6a5145f553
26 changed files with 2615 additions and 221 deletions
+16
View File
@@ -0,0 +1,16 @@
const { DataTypes } = require("sequelize");
const sequelize = require("../../config/db.config");
const LessonPage = sequelize.define("LessonPage", {
page_id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true },
lesson_id: { type: DataTypes.BIGINT, allowNull: false, unique: true },
blocks: { type: DataTypes.JSONB, allowNull: false, defaultValue: [] },
createdBy: { type: DataTypes.BIGINT, allowNull: true, label: "Created By" },
updatedBy: { type: DataTypes.BIGINT, allowNull: true, label: "Updated By" },
}, {
tableName: "lesson_pages",
timestamps: true,
paranoid: false,
});
module.exports = LessonPage;