"use strict";
// oms/src/src/models/messageStrategyModel.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageStrategy = void 0;
const mongoose_1 = require("mongoose");
/**
 * Mongoose Schema for MessageStrategy
 */
const MessageStrategySchema = new mongoose_1.Schema({
    name: {
        type: String,
        required: true,
        unique: true,
        trim: true,
    },
    description: {
        type: String,
    },
    templates: [
        {
            type: mongoose_1.Schema.Types.ObjectId,
            ref: "MessageTemplate", // 引用 MessageTemplate 模型
            default: [],
        },
    ],
}, {
    timestamps: true, // 自动添加 createdAt 和 updatedAt
});
// 导出 MessageStrategy 模型
exports.MessageStrategy = (0, mongoose_1.model)("MessageStrategy", MessageStrategySchema);
