Files
Verso/services/web/app/src/models/ScriptLog.mjs
T
Andrew Rumble d748d8d606 Merge pull request #29795 from overleaf/ar-last-infrastructure-conversions
[web] last infrastructure conversions

GitOrigin-RevId: 68aa11625a9bc6d0d5324ecd95bb5ac52af8ee96
2025-11-27 09:05:30 +00:00

28 lines
867 B
JavaScript

import Mongoose from '../infrastructure/Mongoose.mjs'
export const ScriptLogSchema = new Mongoose.Schema(
{
canonicalName: { type: String, required: true },
filePathAtVersion: { type: String, required: true },
imageVersion: { type: String, required: true },
podName: { type: String, required: true },
startTime: { type: Date, default: Date.now },
endTime: { type: Date, default: null },
username: { type: String, required: true },
status: {
type: String,
enum: ['pending', 'success', 'error'],
default: 'pending',
required: true,
},
vars: { type: Object, required: true },
progressLogs: {
type: [{ timestamp: Date, message: String }],
required: true,
},
},
{ minimize: false, collection: 'scriptLogs' }
)
export const ScriptLog = Mongoose.model('ScriptLog', ScriptLogSchema)