mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
Upgrade Mongoose and the Mongo driver in web GitOrigin-RevId: 2cad1aabe57eae424a9e4c68b2e0062f0e78ffaf
25 lines
474 B
JavaScript
25 lines
474 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
const { Schema } = mongoose
|
|
const { ObjectId } = Schema
|
|
|
|
const FeedbackSchema = new Schema(
|
|
{
|
|
userId: {
|
|
type: ObjectId,
|
|
ref: 'User',
|
|
},
|
|
source: String,
|
|
createdAt: {
|
|
type: Date,
|
|
default() {
|
|
return new Date()
|
|
},
|
|
},
|
|
data: {},
|
|
},
|
|
{ minimize: false }
|
|
)
|
|
|
|
exports.Feedback = mongoose.model('Feedback', FeedbackSchema)
|
|
exports.FeedbackSchema = FeedbackSchema
|