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.
76 lines
1.5 KiB
76 lines
1.5 KiB
4 years ago
|
import _sequelize from 'sequelize';
|
||
|
const { Model, Sequelize } = _sequelize;
|
||
|
|
||
|
export default class workflowsprocesses extends Model {
|
||
|
static init(sequelize, DataTypes) {
|
||
|
super.init({
|
||
|
IntID: {
|
||
|
autoIncrement: true,
|
||
|
type: DataTypes.BIGINT,
|
||
|
allowNull: false,
|
||
|
primaryKey: true
|
||
|
},
|
||
|
WorkflowID: {
|
||
|
type: DataTypes.BIGINT,
|
||
|
allowNull: false
|
||
|
},
|
||
|
WorkTypeID: {
|
||
|
type: DataTypes.SMALLINT,
|
||
|
allowNull: false
|
||
|
},
|
||
|
StateTypeID: {
|
||
|
type: DataTypes.SMALLINT,
|
||
|
allowNull: false
|
||
|
},
|
||
|
UserID: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false
|
||
|
},
|
||
|
UserFirstName: {
|
||
|
type: DataTypes.STRING(50),
|
||
|
allowNull: false
|
||
|
},
|
||
|
UserLastName: {
|
||
|
type: DataTypes.STRING(50),
|
||
|
allowNull: false
|
||
|
},
|
||
|
StartTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: false
|
||
|
},
|
||
|
ExpirationTime: {
|
||
|
type: DataTypes.DATE,
|
||
|
allowNull: true
|
||
|
},
|
||
|
Duration: {
|
||
|
type: DataTypes.BIGINT,
|
||
|
allowNull: true
|
||
|
},
|
||
|
PreviousID: {
|
||
|
type: DataTypes.BIGINT,
|
||
|
allowNull: true
|
||
|
},
|
||
|
Comment: {
|
||
|
type: DataTypes.STRING(255),
|
||
|
allowNull: true
|
||
|
}
|
||
|
}, {
|
||
|
sequelize,
|
||
|
tableName: 'workflowsprocesses',
|
||
|
hasTrigger: true,
|
||
|
timestamps: false,
|
||
|
indexes: [
|
||
|
{
|
||
|
name: "PRIMARY",
|
||
|
unique: true,
|
||
|
using: "BTREE",
|
||
|
fields: [
|
||
|
{ name: "IntID" },
|
||
|
]
|
||
|
},
|
||
|
]
|
||
|
});
|
||
|
return workflowsprocesses;
|
||
|
}
|
||
|
}
|