2021-05-15 19:33:59 +03:00
|
|
|
const { DataTypes } = require('sequelize');
|
2021-05-10 18:47:26 +03:00
|
|
|
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'
|
2021-05-12 18:31:25 +03:00
|
|
|
},
|
|
|
|
isPinned: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
defaultValue: false
|
2021-06-15 17:02:57 +03:00
|
|
|
},
|
|
|
|
orderId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null
|
2021-05-10 18:47:26 +03:00
|
|
|
}
|
2021-05-23 18:18:04 +03:00
|
|
|
}, {
|
|
|
|
tableName: 'apps'
|
2021-05-10 18:47:26 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = App;
|