Files
subwatcher/services/core/src/models/JobLog.ts
wisecolt f1a1f093e6 feat: altyazı otomasyon sistemi MVP'sini ekle
Docker tabanlı mikro servis mimarisi ile altyazı otomasyon sistemi altyapısı kuruldu.

- Core (Node.js): Chokidar dosya izleyici, BullMQ iş kuyrukları, ffprobe medya analizi, MongoDB entegrasyonu ve dosya yazma işlemleri.
- API (Fastify): Mock sağlayıcılar, arşiv güvenliği (zip-slip), altyazı doğrulama, puanlama ve aday seçim motoru.
- UI (React/Vite): İş yönetimi paneli, canlı SSE log akışı, manuel inceleme arayüzü ve sistem ayarları.
- Altyapı: Docker Compose (dev/prod), Redis, Mongo ve çevresel değişken yapılandırmaları.
2026-02-15 23:12:24 +03:00

16 lines
514 B
TypeScript

import { Schema, model } from 'mongoose';
const jobLogSchema = new Schema(
{
jobId: { type: Schema.Types.ObjectId, ref: 'jobs', required: true, index: true },
ts: { type: Date, default: Date.now, index: true },
level: { type: String, enum: ['info', 'warn', 'error'], default: 'info' },
step: { type: String, required: true },
message: { type: String, required: true },
meta: Schema.Types.Mixed
},
{ versionKey: false }
);
export const JobLogModel = model('job_logs', jobLogSchema);