Feedback.mjs 444 B

1234567891011121314151617181920212223
  1. import mongoose from '../infrastructure/Mongoose.js'
  2. const { Schema } = mongoose
  3. const { ObjectId } = Schema
  4. export const FeedbackSchema = new Schema(
  5. {
  6. userId: {
  7. type: ObjectId,
  8. ref: 'User',
  9. },
  10. source: String,
  11. createdAt: {
  12. type: Date,
  13. default() {
  14. return new Date()
  15. },
  16. },
  17. data: {},
  18. },
  19. { minimize: false }
  20. )
  21. export const Feedback = mongoose.model('Feedback', FeedbackSchema)