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
+58
View File
@@ -0,0 +1,58 @@
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('Country', {
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
country: {
type: DataTypes.STRING(50),
allowNull: false
},
code: {
type: DataTypes.STRING(2),
allowNull: false
},
dial_code: {
type: DataTypes.STRING(5),
allowNull: false
},
currency_name: {
type: DataTypes.STRING(40),
allowNull: false
},
currency_symbol: {
type: DataTypes.STRING(20),
allowNull: false
},
currency_code: {
type: DataTypes.STRING(10),
allowNull: false
},
status: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: 1
},
top_image: {
type: DataTypes.INTEGER,
allowNull: true
},
avrg_commute: {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: 0
},
short_name: {
type: DataTypes.STRING(3),
allowNull: true
}
}, {
sequelize,
tableName: 'country',
schema: 'public',
timestamps: false
});
};