2021-05-22 20:04:34 +03:00
|
|
|
const { DataTypes } = require('sequelize');
|
|
|
|
const { sequelize } = require('../db');
|
|
|
|
|
2021-11-09 01:39:42 +03:00
|
|
|
const Bookmark = sequelize.define(
|
|
|
|
'Bookmark',
|
|
|
|
{
|
|
|
|
name: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
categoryId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false,
|
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
defaultValue: '',
|
|
|
|
},
|
|
|
|
isPublic: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: 0,
|
|
|
|
},
|
2021-05-22 20:04:34 +03:00
|
|
|
},
|
2021-11-09 01:39:42 +03:00
|
|
|
{
|
|
|
|
tableName: 'bookmarks',
|
2021-05-22 20:04:34 +03:00
|
|
|
}
|
2021-11-09 01:39:42 +03:00
|
|
|
);
|
2021-05-22 20:04:34 +03:00
|
|
|
|
2021-11-09 01:39:42 +03:00
|
|
|
module.exports = Bookmark;
|