Skip to content

Commit 46fa287

Browse files
committed
Update hist model
1 parent 568e767 commit 46fa287

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Backend/HistoryService/models/Histories.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ const HistorySchema = new mongoose.Schema({
66
ref: 'User',
77
required: true // The user for whom this history entry is being created
88
},
9-
matchedUser: {
10-
type: mongoose.Schema.Types.ObjectId,
11-
ref: 'User',
12-
required: true // The other user they were matched with
9+
matchedUsername: {
10+
type: String,
11+
required: true
1312
},
14-
question: {
15-
type: mongoose.Schema.Types.ObjectId, // Reference to the Question model
16-
ref: 'Question',
13+
questionTitle: {
14+
type: String,
1715
required: true
1816
},
19-
datetime: {
17+
startTime: {
2018
type: Date, // Time when the session started
2119
default: Date.now
2220
},
@@ -25,7 +23,7 @@ const HistorySchema = new mongoose.Schema({
2523
required: true
2624
},
2725
code: {
28-
type: Buffer, // Store the code as binary file
26+
type: Number, // Store the code as binary file
2927
required: true
3028
}
3129
});

0 commit comments

Comments
 (0)