mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
22 lines
350 B
JavaScript
22 lines
350 B
JavaScript
|
|
const mongoose = require('mongoose');
|
||
|
|
|
||
|
|
const challengeSchema = mongoose.Schema({
|
||
|
|
userId: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
unique: true,
|
||
|
|
},
|
||
|
|
challenge: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
createdAt: {
|
||
|
|
type: Date,
|
||
|
|
default: Date.now,
|
||
|
|
index: {
|
||
|
|
expires: '5m',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
module.exports = challengeSchema;
|