const { db } = require('../db/db-connect');
const logger = require('../utils/logger');
const globalService = require("../services/globalService");

async function createFAC(data) {
    return await db.records.create('fac', data);
}

async function getFACbyId(id) {
    const criteria = { 
      filter: `id='${id}'`
    };    

    return globalService.fetchInfoByCriteria("fac", criteria);
}

module.exports = {
    createFAC,
    getFACbyId
};