2021-05-15 19:33:59 +03:00
|
|
|
const { DataTypes } = require('sequelize');
|
2021-05-10 18:47:26 +03:00
|
|
|
const { sequelize } = require('../db');
|
|
|
|
|
2021-11-09 01:39:42 +03:00
|
|
|
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,
|
2021-11-11 18:01:56 +03:00
|
|
|
defaultValue: 1,
|
2021-11-09 01:39:42 +03:00
|
|
|
},
|
2021-12-07 18:48:24 +03:00
|
|
|
description: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: '',
|
|
|
|
},
|
2021-05-10 18:47:26 +03:00
|
|
|
},
|
2021-11-09 01:39:42 +03:00
|
|
|
{
|
|
|
|
tableName: 'apps',
|
2021-05-10 18:47:26 +03:00
|
|
|
}
|
2021-11-09 01:39:42 +03:00
|
|
|
);
|
2021-05-10 18:47:26 +03:00
|
|
|
|
2021-11-09 01:39:42 +03:00
|
|
|
module.exports = App;
|