Files

40 lines
805 B
JavaScript
Raw Permalink Normal View History

2025-07-28 06:42:00 +01:00
module.exports = (sequelize, DataTypes) => {
const flow_log = sequelize.define(
"flow_log",
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
flow_id: {
type: DataTypes.INTEGER,
allowNull: false,
},
task_id: {
type: DataTypes.INTEGER,
allowNull: false,
},
result: {
type: DataTypes.TEXT,
allowNull: true,
},
status: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: "pending",
},
created_at: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW,
},
},
{
timestamps: false,
freezeTableName: true,
tableName: "flow_logs",
}
);
return flow_log;
};