1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-24 13:39:35 +02:00

Modified models to support resource visibility. Added migration

This commit is contained in:
Paweł Malak 2021-11-08 23:39:42 +01:00
parent 08afaece2e
commit ee9aefa4fa
4 changed files with 114 additions and 60 deletions

View file

@ -1,31 +1,40 @@
const { DataTypes } = require('sequelize');
const { sequelize } = require('../db');
const App = sequelize.define('App', {
name: {
type: DataTypes.STRING,
allowNull: false
const App = sequelize.define(
'App',
{
name: {
type: DataTypes.STRING,
allowNull: false,
},
url: {
type: DataTypes.STRING,
allowNull: false,
},
icon: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: 'cancel',
},
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
},
isPublic: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 0,
},
},
url: {
type: DataTypes.STRING,
allowNull: false
},
icon: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: 'cancel'
},
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null
{
tableName: 'apps',
}
}, {
tableName: 'apps'
});
);
module.exports = App;
module.exports = App;