mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-18 23:41:39 +03:00
46 lines
825 B
JavaScript
46 lines
825 B
JavaScript
const { DataTypes } = require('sequelize');
|
|
const { sequelize } = require('../db');
|
|
|
|
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: 1,
|
|
},
|
|
description: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: '',
|
|
},
|
|
},
|
|
{
|
|
tableName: 'apps',
|
|
}
|
|
);
|
|
|
|
module.exports = App;
|