mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
units,lesson as standalone
This commit is contained in:
@@ -42,13 +42,31 @@ const TaskCompletion = sequelize.define('TaskCompletion', {
|
||||
comment: 'Optional note the user attaches when submitting.',
|
||||
order: 1,
|
||||
},
|
||||
response_text: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
comment: 'The learner\'s free-text answer, for submit_text requirements.',
|
||||
order: 1.5,
|
||||
},
|
||||
submitted_at: {
|
||||
type: DataTypes.DATE,
|
||||
defaultValue: DataTypes.NOW,
|
||||
allowNull: false,
|
||||
order: 2,
|
||||
},
|
||||
|
||||
|
||||
// ── Review workflow (requires_review requirements only) ──────────────────
|
||||
status: {
|
||||
type: DataTypes.ENUM('submitted', 'approved', 'rejected'),
|
||||
allowNull: false,
|
||||
defaultValue: 'submitted',
|
||||
order: 2.1,
|
||||
filterable: true,
|
||||
},
|
||||
reviewed_by: { type: DataTypes.BIGINT, allowNull: true, order: 2.2 },
|
||||
reviewed_at: { type: DataTypes.DATE, allowNull: true, order: 2.3 },
|
||||
review_note: { type: DataTypes.TEXT, allowNull: true, comment: 'Optional note the admin leaves when approving/rejecting.', order: 2.4 },
|
||||
|
||||
// ── Audit trails ────────────────────────────────────────────────────────
|
||||
createdBy: { type: DataTypes.BIGINT, allowNull: true, order: 6 },
|
||||
updatedBy: { type: DataTypes.BIGINT, allowNull: true, order: 7 },
|
||||
|
||||
Reference in New Issue
Block a user