2021-05-22 19:04:34 +02:00
|
|
|
const { DataTypes } = require('sequelize');
|
|
|
|
const { sequelize } = require('../db');
|
|
|
|
|
|
|
|
const Bookmark = sequelize.define('Bookmark', {
|
|
|
|
name: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
categoryId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false
|
2021-06-09 12:45:55 +02:00
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
defaultValue: ''
|
2021-06-26 16:22:54 -04:00
|
|
|
},
|
|
|
|
isPinned: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
orderId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null
|
2021-05-22 19:04:34 +02:00
|
|
|
}
|
|
|
|
}, {
|
|
|
|
tableName: 'bookmarks'
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = Bookmark;
|