mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
23 lines
1.4 KiB
JavaScript
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;
|