mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
31 lines
561 B
JavaScript
31 lines
561 B
JavaScript
|
|
const mongoose = require('mongoose');
|
||
|
|
|
||
|
|
const shareSchema = mongoose.Schema(
|
||
|
|
{
|
||
|
|
conversationId: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
title: {
|
||
|
|
type: String,
|
||
|
|
index: true,
|
||
|
|
},
|
||
|
|
user: {
|
||
|
|
type: String,
|
||
|
|
index: true,
|
||
|
|
},
|
||
|
|
messages: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Message' }],
|
||
|
|
shareId: {
|
||
|
|
type: String,
|
||
|
|
index: true,
|
||
|
|
},
|
||
|
|
isPublic: {
|
||
|
|
type: Boolean,
|
||
|
|
default: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
{ timestamps: true },
|
||
|
|
);
|
||
|
|
|
||
|
|
module.exports = mongoose.model('SharedLink', shareSchema);
|