20 lines
571 B
JavaScript
20 lines
571 B
JavaScript
import mongoose from 'mongoose'
|
|
|
|
const wikiArticleSchema = new mongoose.Schema(
|
|
{
|
|
outlineId: { type: String, unique: true, required: true },
|
|
title: { type: String, required: true },
|
|
collection: String,
|
|
url: { type: String, required: true },
|
|
summary: String,
|
|
tags: [{ type: String }],
|
|
publishedAt: Date,
|
|
permission: String,
|
|
lastSyncedAt: Date,
|
|
outlineUpdatedAt: Date
|
|
},
|
|
{ timestamps: true, suppressReservedKeysWarning: true }
|
|
)
|
|
|
|
export default mongoose.models.WikiArticle ||
|
|
mongoose.model('WikiArticle', wikiArticleSchema)
|