You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
585 B

// feed-entry.js
// Copyright (C) 2022 DTP Technologies, LLC
// License: Apache-2.0
'use strict';
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const FeedEntrySchema = new Schema({
feed: { type: Schema.ObjectId, required: true, index: 1, ref: 'Feed' },
published: { type: Date },
title: { type: String },
description: { type: String },
link: { type: String, index: 1 },
});
FeedEntrySchema.index({
feed: 1,
link: 1,
}, {
name: 'feed_entry_by_feed_idx',
});
module.exports = (conn) => {
return conn.model('FeedEntry', FeedEntrySchema);
};