Files
overleaf-cep/services/web/app/src/models/ScriptLog.mjs
T
Andrew Rumble 07c827e9fd Merge pull request #29928 from overleaf/ar-last-infrastructure-conversions
[web] last infrastructure conversions

GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
2025-11-28 09:05:56 +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)