mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 09:23:12 +08:00
Category model and controllers
This commit is contained in:
21
models/Bookmark.js
Normal file
21
models/Bookmark.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}, {
|
||||
tableName: 'bookmarks'
|
||||
});
|
||||
|
||||
module.exports = Bookmark;
|
||||
Reference in New Issue
Block a user