chore: relocate backend into apps/api ahead of monorepo merge

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 12:20:40 +08:00
co-authored by Claude Sonnet 5
parent af44598df6
commit eaa6d2276a
388 changed files with 0 additions and 13998 deletions
+28
View File
@@ -0,0 +1,28 @@
/***********************************************************************************************************************************************************************
* File Name: plan_courses.mdl.js
* Type of Program: Model
* Description: Junction table — links courses to a specific tier plan.
* Composite UNIQUE on (plan_id, course_id) only prevents adding
* the same course twice to the same plan — a course may belong
* to many plans simultaneously (Tier Plans v2, silent duplication
* across bundles is intentional; see admin/tiers.controller.js).
* Bundling/display only, not an access-control mechanism — see
* controllers/client/courses.controller.js (hasItemGrant) /
* user_tier_grants for entitlement.
* Author: Kenneth Obsequio (@lash0000)
* Date Created: Jun. 6, 2026
***********************************************************************************************************************************************************************/
const { DataTypes } = require('sequelize');
const sequelize = require('../../config/db.config');
const mdl_PlanCourses = sequelize.define('PlanCourse', {
id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true },
plan_id: { type: DataTypes.BIGINT, allowNull: false },
course_id: { type: DataTypes.BIGINT, allowNull: false },
}, {
tableName: 'plan_courses',
timestamps: true,
paranoid: false,
});
module.exports = mdl_PlanCourses;