mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-30 14:07:10 +03:00
40 lines
710 B
JavaScript
40 lines
710 B
JavaScript
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,
|
|
},
|
|
icon: {
|
|
type: DataTypes.STRING,
|
|
defaultValue: '',
|
|
},
|
|
isPublic: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: 1,
|
|
},
|
|
orderId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
},
|
|
},
|
|
{
|
|
tableName: 'bookmarks',
|
|
}
|
|
);
|
|
|
|
module.exports = Bookmark;
|