package ru.micord.ervu.account_applications.dao;


import org.jooq.DSLContext;
import org.jooq.Table;
import org.springframework.stereotype.Repository;
import ru.micord.ervu.account_applications.db_beans.public_.Tables;
import ru.micord.ervu.account_applications.db_beans.public_.tables.records.SolutionRecord;

/**
 * @author Adel Kalimullin
 */
@Repository
public class SolutionDao extends AbstractDataDao<SolutionRecord> {
  protected SolutionDao(DSLContext dsl) {
    super(dsl);
  }

  public void setActiveStatus(String id, boolean active) {
    setFieldByField(Tables.SOLUTION.ACTIVE, active, Tables.SOLUTION.ID, id);
  }

  @Override
  protected Table<SolutionRecord> getTable() {
    return Tables.SOLUTION;
  }
}
