Skip to content

Commit

Permalink
add period to plenaryMinute
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed Oct 22, 2023
1 parent ef3dff0 commit e61093b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common/bundestagio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@democracy-deutschland/bundestagio-common",
"version": "0.1.16",
"version": "0.1.21",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
Expand Down
19 changes: 13 additions & 6 deletions common/bundestagio/src/models/PlenaryMinute/schema.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
import { Schema, Document, SchemaTimestampsConfig } from "mongoose";
import { Schema, Document, SchemaTimestampsConfig } from 'mongoose';

export interface IPlenaryMinute {
date: Date;
meeting: number;
period: number;
xml: string;
}

export type PlenaryMinuteDoc = IPlenaryMinute &
Document &
SchemaTimestampsConfig;
export type PlenaryMinuteDoc = IPlenaryMinute & Document & SchemaTimestampsConfig;

const PlenaryMinuteSchema = new Schema<PlenaryMinuteDoc>(
{
date: { type: Date, required: true, unique: true },
meeting: { type: Number, required: true, unique: true },
meeting: { type: Number, required: true, unique: false },
period: { type: Number, required: true, unique: false },
xml: { type: String, required: true, unique: true },
},
{ timestamps: true }
{ timestamps: true },
);
PlenaryMinuteSchema.index(
{
meeting: 1,
period: 1,
},
{ unique: true },
);

export default PlenaryMinuteSchema;

0 comments on commit e61093b

Please sign in to comment.