ed17421b5d
Collect Galileo Feedbacks in Mongo GitOrigin-RevId: fe1589ab568ff1bc4de812e205d34e696f3b3a31
22 lines
421 B
JavaScript
22 lines
421 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: {},
|
|
})
|
|
|
|
exports.Feedback = mongoose.model('Feedback', FeedbackSchema)
|
|
exports.FeedbackSchema = FeedbackSchema
|