ready to test

Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-22 10:06:58 +08:00
parent bf48c95467
commit 439bb33f77
189 changed files with 17559 additions and 686 deletions
+30
View File
@@ -0,0 +1,30 @@
/***********************************************************************************************************************************************************************
* File Name: user_tiers.mdl.js
* Type of Program: Model
* Description: Sequelize model for the `user_tiers` table.
* Full history of tier grants per user.
* Author: Kenneth Obsequio (@lash0000)
* Date Created: Jun. 6, 2026
***********************************************************************************************************************************************************************/
const { DataTypes } = require('sequelize');
const sequelize = require('../../config/db.config');
const mdl_UserTiers = sequelize.define('UserTier', {
tier_id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true, label: 'Tier ID' },
user_id: { type: DataTypes.BIGINT, allowNull: false, label: 'User ID' },
tier: { type: DataTypes.ENUM('free', 'premium', 'exclusive'), allowNull: false, defaultValue: 'free', label: 'Tier' },
status: { type: DataTypes.ENUM('active', 'expired', 'revoked'), allowNull: false, defaultValue: 'active', label: 'Status' },
starts_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW, label: 'Starts At' },
expires_at: { type: DataTypes.DATE, allowNull: true, label: 'Expires At' },
granted_by: { type: DataTypes.BIGINT, allowNull: true, label: 'Granted By' },
revoked_by: { type: DataTypes.BIGINT, allowNull: true, label: 'Revoked By' },
revoked_at: { type: DataTypes.DATE, allowNull: true, label: 'Revoked At' },
notes: { type: DataTypes.TEXT, allowNull: true, label: 'Notes' },
}, {
tableName: 'user_tiers',
timestamps: true,
paranoid: false,
});
module.exports = mdl_UserTiers;