mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-18 23:41:39 +03:00
32 lines
567 B
JavaScript
32 lines
567 B
JavaScript
const { DataTypes } = require('sequelize');
|
|
const { sequelize } = require('../db');
|
|
|
|
const Category = sequelize.define(
|
|
'Category',
|
|
{
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
},
|
|
isPinned: {
|
|
type: DataTypes.BOOLEAN,
|
|
defaultValue: false,
|
|
},
|
|
orderId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
},
|
|
isPublic: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: 1,
|
|
},
|
|
},
|
|
{
|
|
tableName: 'categories',
|
|
}
|
|
);
|
|
|
|
module.exports = Category;
|