flame/models/Category.js
2021-05-22 19:04:34 +02:00

17 lines
330 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
}
}, {
tableName: 'categories'
});
module.exports = Category;