|
@@ -12,6 +12,7 @@ const generateExpirationDate = (): Date => {
|
|
|
|
|
|
|
|
interface ThreadRelation {
|
|
interface ThreadRelation {
|
|
|
userId: mongoose.Types.ObjectId;
|
|
userId: mongoose.Types.ObjectId;
|
|
|
|
|
+ vectorStore: mongoose.Types.ObjectId;
|
|
|
threadId: string;
|
|
threadId: string;
|
|
|
expiredAt: Date;
|
|
expiredAt: Date;
|
|
|
}
|
|
}
|
|
@@ -30,6 +31,11 @@ const schema = new Schema<ThreadRelationDocument, ThreadRelationModel>({
|
|
|
ref: 'User',
|
|
ref: 'User',
|
|
|
required: true,
|
|
required: true,
|
|
|
},
|
|
},
|
|
|
|
|
+ vectorStore: {
|
|
|
|
|
+ type: Schema.Types.ObjectId,
|
|
|
|
|
+ ref: 'VectorStore',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ },
|
|
|
threadId: {
|
|
threadId: {
|
|
|
type: String,
|
|
type: String,
|
|
|
required: true,
|
|
required: true,
|