Files
starr-philproperties/models/tiers/tier_categories.mdl.js
T
kennethobsequio 89acdfc239 push
pushy

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-06-28 11:29:07 +08:00

23 lines
1.4 KiB
JavaScript

const { DataTypes } = require('sequelize');
const sequelize = require('../../config/db.config');
const mdl_TierCategories = sequelize.define('TierCategory', {
tier_category_id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true },
slug: { type: DataTypes.STRING(50), allowNull: false, unique: true, label: 'Slug' },
name: { type: DataTypes.STRING(100), allowNull: false, label: 'Name' },
description: { type: DataTypes.TEXT, allowNull: true, label: 'Description' },
rank: { type: DataTypes.INTEGER, allowNull: false, defaultValue: 0, label: 'Rank' },
badge_asset_id: { type: DataTypes.BIGINT, allowNull: true, label: 'Badge Asset' },
badge_icon: { type: DataTypes.STRING(50), allowNull: true, label: 'Badge Icon' },
badge_label: { type: DataTypes.STRING(100), allowNull: true, label: 'Badge Label' },
color: { type: DataTypes.STRING(30), allowNull: false, defaultValue: 'purple', label: 'Color' },
is_default: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, label: 'Default' },
is_active: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true, label: 'Active' },
}, {
tableName: 'tier_categories',
timestamps: true,
paranoid: false,
});
module.exports = mdl_TierCategories;