From a00113d0d0aa135b75448bca8ee6d60edb005dab Mon Sep 17 00:00:00 2001 From: Rithish-2914 Date: Thu, 13 Aug 2026 17:58:55 +0530 Subject: [PATCH 1/3] Add school information to papers --- src/components/Card.tsx | 1 + src/db/papers.ts | 8 ++++++++ src/interface.ts | 26 ++++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 13bc04c..1477193 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -100,6 +100,7 @@ const Card = ({ paper, onSelect, isSelected, isShow=true }: CardProps) => { {paper.slot} {paper.year} {paper.semester} + {paper.school && {paper.school}} diff --git a/src/db/papers.ts b/src/db/papers.ts index c3f8781..88ae5cf 100644 --- a/src/db/papers.ts +++ b/src/db/papers.ts @@ -31,6 +31,10 @@ const adminSchema = new Schema({ "Mauritius", ], }, + school: { + type: String || null, + enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST","SCORE"], + }, answer_key_included: { type: Boolean || null, default: false }, is_selected: { type: Boolean, default: false }, ambiguous_tags: { type: [String], default: [] }, @@ -69,6 +73,10 @@ const paperSchema = new Schema({ ], required: true, }, + school: { + type: String, + enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST"], + }, answer_key_included: { type: Boolean, default: false }, }); diff --git a/src/interface.ts b/src/interface.ts index c64ca35..990618e 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -2,8 +2,6 @@ import { type mongo } from "mongoose"; export interface IUpcomingSlot { slot: string; - lastSyncedDate?: string; - syncMode?: "CAT" | "FAT"; } export interface IUpcomingSubject { @@ -17,6 +15,7 @@ export interface PaperResponse { year: string; slot: string; exam: string; + school?: string; } export interface IAdminPaper { @@ -40,6 +39,18 @@ export interface IAdminPaper { | "Bangalore" | "Mauritius" | null; + school?: + | "SCOPE" + | "SITE" + | "SENSE" + | "SMEC" + | "SCE" + | "SELECT" + | "SAS" + | "SSL" + | "VITBS" + | "SBST" + | null; answer_key_included?: boolean | null; is_selected?: boolean; ambiguous_tags: string[]; @@ -94,6 +105,17 @@ export interface IPaper { | "Bhopal" | "Bangalore" | "Mauritius"; + school?: + | "SCOPE" + | "SITE" + | "SENSE" + | "SMEC" + | "SCE" + | "SELECT" + | "SAS" + | "SSL" + | "VITBS" + | "SBST"; slot: string; subject: string; year: string; From 86cb3e4fbef3a0f5c6ee03ab9c81a0524606a1b4 Mon Sep 17 00:00:00 2001 From: Rithish-2914 Date: Fri, 14 Aug 2026 12:32:55 +0530 Subject: [PATCH 2/3] Fix upcoming slot type definition --- src/interface.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interface.ts b/src/interface.ts index 990618e..03b3c93 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -2,6 +2,8 @@ import { type mongo } from "mongoose"; export interface IUpcomingSlot { slot: string; + lastSyncedDate?: string; + syncMode?: "CAT" | "FAT"; } export interface IUpcomingSubject { From a00b9a88dbc9df27a240126824066713eeb88e89 Mon Sep 17 00:00:00 2001 From: Rithish-2914 Date: Sun, 16 Aug 2026 21:10:54 +0530 Subject: [PATCH 3/3] ADDED MORE SCHOOLS --- src/db/papers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/papers.ts b/src/db/papers.ts index 88ae5cf..3d1fb03 100644 --- a/src/db/papers.ts +++ b/src/db/papers.ts @@ -75,7 +75,7 @@ const paperSchema = new Schema({ }, school: { type: String, - enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST"], + enum: ["SCOPE","SITE","SENSE","SMEC","SCE","SELECT","SAS","SSL","VITBS","SBST","SCORE","SCHEME","SHINE","V-SIGN","V-SMART","V-SPARC","VAIAL","HOT"], }, answer_key_included: { type: Boolean, default: false }, });