Conversation
45801ad to
2194859
Compare
Vdaleke
left a comment
There was a problem hiding this comment.
Я что-то накидал, что быстро увидел. Но это не полное ревью
CMakeLists.txt
Outdated
There was a problem hiding this comment.
Комментарии на русском языке, заменить на английский
CMakeLists.txt
Outdated
| cmake_minimum_required(VERSION 3.10) | ||
|
|
||
| # Название проекта (можете изменить) | ||
| project(CreateAllTables) |
There was a problem hiding this comment.
Когда отребейзишься на новый main, заменить
CreateAllTable.sql
Outdated
| program_id SERIAL PRIMARY KEY, | ||
| program_name VARCHAR(50) UNIQUE NOT NULL | ||
| ); | ||
| INSERT INTO Programs (program_name) VALUES |
There was a problem hiding this comment.
Это не то должно быть заинлайнено, а должно настраиваться.
CreateAllTable.sql
Outdated
| role_id SERIAL PRIMARY KEY, | ||
| role_name VARCHAR(255) UNIQUE NOT NULL | ||
| ); | ||
| INSERT INTO Roles (role_name) VALUES |
There was a problem hiding this comment.
оставить TODO, что потом добавим разные роли.
CreateAllTable.sql
Outdated
|
|
||
| CREATE TABLE Students ( | ||
| student_id SERIAL PRIMARY KEY, | ||
| person_id INT UNIQUE REFERENCES People(person_id) ON DELETE CASCADE, |
inc/Categories.hpp
Outdated
|
|
||
| class Categories { | ||
| public: | ||
| static void Create(pqxx::connection &conn, const std::string category_name , const int filter_id , bool required); |
There was a problem hiding this comment.
тут явно не проходился clang-format. пройтись.
inc/CreateAllTables.hpp
Outdated
There was a problem hiding this comment.
под такое отдельный хедер сомнительный. вынести все такие функции в какие-нибудь utils.cpp или tools.cpp
inc/Feedback.hpp
Outdated
| public: | ||
| static void Create(pqxx::connection &conn, const int teacher_id , const int subject_id , std::string feedback_name); | ||
|
|
||
| static std::string ReadFeedbackName(pqxx::connection &conn, const int feedback_id); |
There was a problem hiding this comment.
Не надо делать различные read функции под каждое поле. сделай чтобы возвращался целиком класс
inc/Feedback_Participants.hpp
Outdated
| public: | ||
| static void Create(pqxx::connection &conn, int student_id , int feedback_id , std::string student_feedback); | ||
|
|
||
| static std::string ReadFeedback(pqxx::connection &conn, const int student_id ,const int feedback_id ); |
There was a problem hiding this comment.
Аналогично целиком возвращать класс. и так везде.
src/Categories.cpp
Outdated
There was a problem hiding this comment.
Ты задолбаешься std::cout чистить. Добавьте нормальную библиотеку для логирования. Например https://github.com/gabime/spdlog
|
Сделать нормальное название пул реквеста, написать нормальное description. Почистить историю коммитов. Сделать логическое разделение коммитов по смыслу. |
…st of the code into
…he template have been improved .
…ers, Tags, and Categories - Added new tables: Feedback_URL and Feedback_Request - Refactored existing tables: Filters, Tags, and Categories
… added to take all students and people from tables, and the Update and Delete methods for category tables have been corrected.
No description provided.