adpa-enterprise-framework-automation
Version:
Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe
30 lines • 1.06 kB
JavaScript
import mongoose, { Schema } from 'mongoose';
const TemplateSchema = new Schema({
name: { type: String, required: true },
description: { type: String },
category: { type: String },
template_type: { type: String },
ai_instructions: { type: String },
prompt_template: { type: String },
generation_function: { type: String },
metadata: {
tags: { type: [String], required: false },
variables: [Schema.Types.Mixed],
layout: Schema.Types.Mixed,
emoji: String,
priority: Number,
source: String
},
version: { type: Number, default: 1 },
is_active: { type: Boolean, default: true },
is_system: { type: Boolean, default: false },
created_by: { type: String },
created_at: { type: Date, default: Date.now },
updated_at: { type: Date, default: Date.now }
});
TemplateSchema.pre('save', function (next) {
this.updated_at = new Date();
next();
});
export const TemplateModel = mongoose.model('Template', TemplateSchema);
//# sourceMappingURL=Template.model.js.map