update profile and models

This commit is contained in:
Le Viet
2022-03-30 16:49:28 +07:00
parent 4e8d728142
commit eb5caa83a1
158 changed files with 7371 additions and 156 deletions
+59
View File
@@ -0,0 +1,59 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('TransportProviders', {
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
name: {
type: DataTypes.STRING(50),
allowNull: false
},
client: {
type: DataTypes.STRING(100),
allowNull: true
},
token: {
type: DataTypes.STRING(200),
allowNull: true
},
code: {
type: DataTypes.STRING(100),
allowNull: true
},
access_token: {
type: DataTypes.STRING(200),
allowNull: true
},
active: {
type: DataTypes.SMALLINT,
allowNull: true,
defaultValue: 1
},
timeout: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 3000
},
retries: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 5
},
category: {
type: DataTypes.STRING(30),
allowNull: true
},
name_alias: {
type: DataTypes.STRING(100),
allowNull: true
}
}, {
sequelize,
tableName: 'transport_providers',
schema: 'public',
timestamps: false
});
};