"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mongoose = require("mongoose");
const mongoose_1 = require("mongoose");
const aggregatePaginate = require('mongoose-aggregate-paginate-v2');
const Schema = mongoose.Schema;
const NotificationUserSchema = new Schema({
    to_id: {
        type: Schema.Types.ObjectId,
        ref: "User",
    },
    from_id: {
        type: Schema.Types.ObjectId,
        ref: "User",
    },
    title: {
        type: String,
        default: null,
    },
    description: {
        type: String,
        default: null,
    },
    data: {
        type: Object,
        default: null,
    },
    is_read: {
        type: Boolean,
        default: false,
    },
}, {
    timestamps: {
        createdAt: 'created_at',
        updatedAt: 'updated_at'
    }
});
NotificationUserSchema.plugin(aggregatePaginate);
const NotificationUser = (0, mongoose_1.model)("NotificationUser", NotificationUserSchema);
exports.default = NotificationUser;
