export default async function addService(db, { name, types, code, unit, description, group, tab, costs, prices, smartScoping, autofill, }) {
  const id = db.getDocumentId();
  const data = {
    name,
    id,
    createdAt: new Date(),
    types,
    code,
    unit,
    description,
    group,
    tab,
    costs,
    prices,
    smartScoping,
    autofill,
  };
  return db.add("services", data, id);
}
