1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-24 13:39:35 +02:00

Category model and controllers

This commit is contained in:
unknown 2021-05-22 19:04:34 +02:00
parent 5c948e1a68
commit 100f274d96
8 changed files with 164 additions and 4 deletions

17
models/Category.js Normal file
View file

@ -0,0 +1,17 @@
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;