mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
21 lines
348 B
JavaScript
21 lines
348 B
JavaScript
|
|
const mongoose = require('mongoose');
|
||
|
|
|
||
|
|
const sessionSchema = mongoose.Schema({
|
||
|
|
refreshTokenHash: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
expiration: {
|
||
|
|
type: Date,
|
||
|
|
required: true,
|
||
|
|
expires: 0,
|
||
|
|
},
|
||
|
|
user: {
|
||
|
|
type: mongoose.Schema.Types.ObjectId,
|
||
|
|
ref: 'User',
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
module.exports = sessionSchema;
|