export default async function addMaterial(db, data) {
  const id = db.getDocumentId();
  const output = {
    id,
    ...data,
    createdAt: new Date(),
  };
  return db.add("materials", output, id);
}
