var pool = require('../config/dbConnection');
const baseModel = require("../models/baseModel");

class FormsModel extends baseModel{

    async saveFormDetails(fieldValues){
        console.log("inside saveFormDetails");
        try{
            const result = await pool.query('INSERT INTO form_submissions SET ?', fieldValues);
            return result[0].insertId;
        }catch(error){
            console.log(error);
            throw error;
        }
    }
}
module.exports = FormsModel;