mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
added and fix some of things
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const excludeAttributes = ['description'];
|
||||
const jsonbSchemas = {};
|
||||
|
||||
module.exports = { excludeAttributes, jsonbSchemas };
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user