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