flame/models/Category.js

22 lines
421 B
JavaScript
Raw Normal View History

2021-05-22 20:04:34 +03:00
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
2021-05-22 20:04:34 +03:00
}
}, {
tableName: 'categories'
});
module.exports = Category;