1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-23 21:29:37 +02:00
flame/models/Category.js

27 lines
561 B
JavaScript
Raw Normal View History

2021-05-22 19:04:34 +02:00
const { DataTypes } = require('sequelize');
const { sequelize } = require('../db');
const Category = sequelize.define('Category', {
name: {
type: DataTypes.STRING,
allowNull: false
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: 'bookmarks' // Default value for database migration only
},
2021-05-22 19:04:34 +02:00
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null
2021-05-22 19:04:34 +02:00
}
}, {
tableName: 'categories'
});
module.exports = Category;