#pragma once

#include <maps/wikimap/mapspro/libs/assessment/include/unit.h>
#include <pqxx/pqxx>

namespace maps::wiki::assessment::units {

Grade addGrade(
    pqxx::transaction_base& txn,
    TUid gradedBy,
    TId unitId,
    Grade::Value value,
    const std::optional<std::string>& comment,
    Qualification qualification);

void updateGradeStats(
    pqxx::transaction_base& txn,
    TId unitId,
    Grade::Value value,
    Qualification qualification);

} // namespace maps::wiki::assessment::units
