1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-02 17:35:17 +02:00

Merge branch 'master' of https://github.com/pawelmalak/flame into merge_upstream_2020-12-06

This commit is contained in:
François Darveau 2021-12-06 22:29:22 -05:00
commit 021bd4e85a
266 changed files with 13470 additions and 7067 deletions

View file

@ -1,36 +1,44 @@
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,
},
categoryId: {
type: DataTypes.INTEGER,
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: 1,
},
},
url: {
type: DataTypes.STRING,
allowNull: false
},
categoryId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: -1 // Default value for database migration only
},
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;

View file

@ -1,34 +1,39 @@
const { DataTypes } = require('sequelize');
const { sequelize } = require('../db');
const Bookmark = sequelize.define('Bookmark', {
name: {
type: DataTypes.STRING,
allowNull: false
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,
},
},
url: {
type: DataTypes.STRING,
allowNull: false
},
categoryId: {
type: DataTypes.INTEGER,
allowNull: false
},
icon: {
type: DataTypes.STRING,
defaultValue: ''
},
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null
{
tableName: 'bookmarks',
}
}, {
tableName: 'bookmarks'
});
);
module.exports = Bookmark;
module.exports = Bookmark;

View file

@ -1,27 +1,35 @@
const { DataTypes } = require('sequelize');
const { sequelize } = require('../db');
const Category = sequelize.define('Category', {
name: {
type: DataTypes.STRING,
allowNull: false
const Category = sequelize.define(
'Category',
{
name: {
type: DataTypes.STRING,
allowNull: false,
},
type: {
type: DataTypes.STRING,
allowNull: false,
},
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
},
isPublic: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 1,
},
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: 'bookmarks' // Default value for database migration only
},
isPinned: {
type: DataTypes.BOOLEAN,
defaultValue: false
},
orderId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null
{
tableName: 'categories',
}
}, {
tableName: 'categories'
});
);
module.exports = Category;
module.exports = Category;

View file

@ -1,16 +1,23 @@
const { DataTypes } = require('sequelize');
const { sequelize } = require('../db');
const Weather = sequelize.define('Weather', {
externalLastUpdate: DataTypes.STRING,
tempC: DataTypes.FLOAT,
tempF: DataTypes.FLOAT,
isDay: DataTypes.INTEGER,
cloud: DataTypes.INTEGER,
conditionText: DataTypes.TEXT,
conditionCode: DataTypes.INTEGER
}, {
tableName: 'weather'
});
const Weather = sequelize.define(
'Weather',
{
externalLastUpdate: DataTypes.STRING,
tempC: DataTypes.FLOAT,
tempF: DataTypes.FLOAT,
isDay: DataTypes.INTEGER,
cloud: DataTypes.INTEGER,
conditionText: DataTypes.TEXT,
conditionCode: DataTypes.INTEGER,
humidity: DataTypes.INTEGER,
windK: DataTypes.FLOAT,
windM: DataTypes.FLOAT,
},
{
tableName: 'weather',
}
);
module.exports = Weather;
module.exports = Weather;