2021-05-22 17:04:34 +00:00
|
|
|
const { DataTypes } = require('sequelize');
|
|
|
|
const { sequelize } = require('../db');
|
|
|
|
|
2021-11-08 22:39:42 +00: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,
|
2021-11-11 15:01:56 +00:00
|
|
|
defaultValue: 1,
|
2021-11-08 22:39:42 +00:00
|
|
|
},
|
2021-11-22 15:45:59 +00:00
|
|
|
orderId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
},
|
2021-05-22 17:04:34 +00:00
|
|
|
},
|
2021-11-08 22:39:42 +00:00
|
|
|
{
|
|
|
|
tableName: 'bookmarks',
|
2021-05-22 17:04:34 +00:00
|
|
|
}
|
2021-11-08 22:39:42 +00:00
|
|
|
);
|
2021-05-22 17:04:34 +00:00
|
|
|
|
2021-11-08 22:39:42 +00:00
|
|
|
module.exports = Bookmark;
|