package eu.dnetlib.openaire.user.queries;

public interface RoleVerificationQueries {

    String FETCH_ALL = "SELECT * FROM role_verification";
    String FETCH_BY_ID = "SELECT * FROM role_verification WHERE id = ?";
    String FETCH_BY_EMAIL_TYPE_ENTITY_VERIFICATION_TYPE = "SELECT * FROM role_verification " +
            "WHERE email = ? AND type = ? AND entity = ? AND verification_type = ?";
    String FETCH_BY_TYPE_ENTITY_VERIFICATION_TYPE = "SELECT DISTINCT email FROM role_verification " +
            "WHERE type = ? AND entity = ? AND verification_type = ?";


    String COUNT_ALL = "SELECT COUNT(*) FROM role_verification";

    String INSERT = "INSERT INTO role_verification (" +
            "id, " +
            "email, " +
            "verification_code, " +
            "verification_type, " +
            "type, " +
            "entity, " +
            "date " +
            ") VALUES (?,?,?,?,?,?,?)";

    String UPDATE = "UPDATE role_verification SET " +
            "id = ?, " +
            "username = ?, " +
            "verification_code = ?, " +
            "verification_type = ?, " +
            "type = ?, " +
            "entity = ?, " +
            "date = ? " +
            "WHERE id = ?";

    String DELETE = "DELETE FROM role_verification WHERE id = ?";

}
