/
Wizardd
/
Forms
Обзор
Документация
Войти
/
Wizardd
/
Forms
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/models/Response.js
27 строк
503 B
Aleksey
fix
17 июн 2025, 20:28
17 июн 2025, 20:28
b1db88e
Код
Авторство
О чём код?
const mongoose = require('mongoose'); const responseSchema = new mongoose.Schema( { formId: { type: mongoose.Schema.Types.ObjectId, ref: 'Form', required: true }, email: { type: String, required: true }, answers: [ { name: { type: String, required: true }, answer: mongoose.Schema.Types.Mixed } ] }, { timestamps: true } ); module.exports = mongoose.model('Response', responseSchema);