Skip to content

Commit

Permalink
feat: 🚀 add non-named-votes-ai service
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed Aug 11, 2024
1 parent 675dca5 commit 989e59b
Show file tree
Hide file tree
Showing 17 changed files with 725 additions and 91 deletions.
5 changes: 5 additions & 0 deletions common/bundestagio/src/models/NonNamedVotesAI/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import mongoose from 'mongoose';
import NonNamedVotesAiSchema, { INonNamedVotesAi } from './schema';

export const NonNamedVotesAiModel = mongoose.model<INonNamedVotesAi>('NonNamedVotesAi', NonNamedVotesAiSchema);
export { NonNamedVotesAiSchema, INonNamedVotesAi };
22 changes: 22 additions & 0 deletions common/bundestagio/src/models/NonNamedVotesAI/schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Schema, SchemaTimestampsConfig, Document } from 'mongoose';

export interface INonNamedVotesAi extends Document, SchemaTimestampsConfig {
pdfUrl: string;
assistantId: string;
vectorStoreId: string;
threadId: string;
fileId?: string;
}

const NonNamedVotesAiSchema = new Schema<INonNamedVotesAi>(
{
pdfUrl: { type: String, unique: true, index: true, required: true },
assistantId: { type: String, required: true },
vectorStoreId: { type: String, required: true },
threadId: { type: String, required: true },
fileId: { type: String, required: true },
},
{ timestamps: true },
);

export default NonNamedVotesAiSchema;
1 change: 1 addition & 0 deletions common/bundestagio/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from './NamedPoll';
export * from './Procedure';
export * from './User';
export * from './PlenaryMinute';
export * from './NonNamedVotesAI';
Loading

0 comments on commit 989e59b

Please sign in to comment.