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
@@ -0,0 +1,31 @@
'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('admin_notifications', {
notification_id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true },
type: { type: Sequelize.STRING(64), allowNull: false },
title: { type: Sequelize.STRING(255), allowNull: false },
message: { type: Sequelize.TEXT, allowNull: false },
data: { type: Sequelize.JSONB, allowNull: true, defaultValue: null },
seen: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false },
seen_at: { type: Sequelize.DATE, allowNull: true, defaultValue: null },
show_in_notifications: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: true },
show_in_sticky: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false },
color: { type: Sequelize.STRING(20), allowNull: false, defaultValue: 'indigo' },
start_date: { type: Sequelize.DATE, allowNull: true },
end_date: { type: Sequelize.DATE, allowNull: true },
broadcast_id: { type: Sequelize.BIGINT, allowNull: true, references: { model: 'notification_broadcasts', key: 'broadcast_id' }, onDelete: 'SET NULL' },
createdAt: { type: Sequelize.DATE, allowNull: false },
updatedAt: { type: Sequelize.DATE, allowNull: false },
});
await queryInterface.addIndex('admin_notifications', { fields: ['seen'], name: 'idx_an_seen' });
await queryInterface.addIndex('admin_notifications', { fields: ['type'], name: 'idx_an_type' });
await queryInterface.addIndex('admin_notifications', { fields: ['createdAt'], name: 'idx_an_created_at' });
},
async down(queryInterface) {
await queryInterface.dropTable('admin_notifications');
},
};