added and fix some of things

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-08-03 12:03:02 +08:00
parent 6765c1faba
commit d246c09cdd
31 changed files with 724 additions and 510 deletions
+6
View File
@@ -0,0 +1,6 @@
'use strict';
const excludeAttributes = ['description'];
const jsonbSchemas = {};
module.exports = { excludeAttributes, jsonbSchemas };
+5 -2
View File
@@ -3,11 +3,14 @@ const { DataTypes } = require('sequelize');
const sequelize = require('../../config/db.config');
const mdl_Category = sequelize.define('Category', {
id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true },
id: { type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true, hidden: true },
name: { type: DataTypes.STRING(100), allowNull: false, unique: true },
slug: { type: DataTypes.STRING(120), allowNull: false, unique: true },
description: { type: DataTypes.TEXT, allowNull: true },
is_active: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true },
is_active: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true, label: "Status" },
createdBy: { type: DataTypes.BIGINT, allowNull: true, label: "Created By" },
updatedBy: { type: DataTypes.BIGINT, allowNull: true, label: "Modified By" },
deletedBy: { type: DataTypes.BIGINT, allowNull: true, label: "Deleted By" },
}, {
tableName: 'categories',
timestamps: true,