You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.2 KiB

4 years ago
import _sequelize from 'sequelize';
const { Model, Sequelize } = _sequelize;
export default class isic-business extends Model {
static init(sequelize, DataTypes) {
super.init({
ID: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
Code: {
type: DataTypes.STRING(10),
allowNull: false
},
Value: {
type: DataTypes.STRING(200),
allowNull: false
},
Type: {
type: DataTypes.STRING(20),
allowNull: false
},
CreationDate: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: Sequelize.fn('current_timestamp')
},
ModificationDate: {
type: DataTypes.DATE,
allowNull: true
},
Version: {
type: DataTypes.DOUBLE,
allowNull: false,
defaultValue: 1
},
Deleted: {
type: DataTypes.TINYINT,
allowNull: false,
defaultValue: 0
}
}, {
sequelize,
tableName: 'isic-business',
hasTrigger: true,
timestamps: false,
indexes: [
{
name: "PRIMARY",
unique: true,
using: "BTREE",
fields: [
{ name: "ID" },
]
},
]
});
return isic-business;
}
}