/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const ReportGenerationBatch = sequelize.define("reportGenerationBatch", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "Primary key", primaryKey: true, field: "id", autoIncrement: true }, templateId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "Template id", primaryKey: false, field: "template_id", autoIncrement: false, references: { key: "id", model: "reportTemplate" } }, templateBatchDimensionId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "Template batch dimension id", primaryKey: false, field: "template_batch_dimension_id", autoIncrement: false, references: { key: "id", model: "reportTemplateBatchDimension" } }, createdBy: { type: DataTypes.TEXT, allowNull: false, defaultValue: null, comment: "Creator", primaryKey: false, field: "created_by", autoIncrement: false }, namePattern: { type: DataTypes.TEXT, allowNull: false, defaultValue: null, comment: "Instance name pattern", primaryKey: false, field: "name_pattern", autoIncrement: false }, status: { type: DataTypes.TEXT, allowNull: false, defaultValue: "pending", comment: "Batch status", primaryKey: false, field: "status", autoIncrement: false }, totalCount: { type: DataTypes.INTEGER, allowNull: false, defaultValue: 0, comment: "Total item count", primaryKey: false, field: "total_count", autoIncrement: false }, successCount: { type: DataTypes.INTEGER, allowNull: false, defaultValue: 0, comment: "Success item count", primaryKey: false, field: "success_count", autoIncrement: false }, failedCount: { type: DataTypes.INTEGER, allowNull: false, defaultValue: 0, comment: "Failed item count", primaryKey: false, field: "failed_count", autoIncrement: false }, requestPayload: { type: DataTypes.JSONB, allowNull: false, defaultValue: {}, comment: "Request payload snapshot", primaryKey: false, field: "request_payload", autoIncrement: false }, startedAt: { type: DataTypes.DATE, allowNull: true, defaultValue: null, comment: "Started time", primaryKey: false, field: "started_at", autoIncrement: false }, finishedAt: { type: DataTypes.DATE, allowNull: true, defaultValue: null, comment: "Finished time", primaryKey: false, field: "finished_at", autoIncrement: false }, createdAt: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), comment: "Created time", primaryKey: false, field: "created_at", autoIncrement: false } }, { tableName: "report_generation_batch", comment: "Report generation batch table", indexes: [] }); dc.models.ReportGenerationBatch = ReportGenerationBatch; return ReportGenerationBatch; };