feat: rebuild CSP practice workflow, UX and automation
这个提交包含在:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "csp/db/sqlite_db.h"
|
||||
#include "csp/domain/entities.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace csp::services {
|
||||
|
||||
struct WrongBookEntry {
|
||||
domain::WrongBookItem item;
|
||||
std::string problem_title;
|
||||
};
|
||||
|
||||
class WrongBookService {
|
||||
public:
|
||||
explicit WrongBookService(db::SqliteDb& db) : db_(db) {}
|
||||
|
||||
std::vector<WrongBookEntry> ListByUser(int64_t user_id);
|
||||
void UpsertNote(int64_t user_id, int64_t problem_id, const std::string& note);
|
||||
void UpsertBySubmission(int64_t user_id,
|
||||
int64_t problem_id,
|
||||
int64_t submission_id,
|
||||
const std::string& note);
|
||||
void Remove(int64_t user_id, int64_t problem_id);
|
||||
|
||||
private:
|
||||
db::SqliteDb& db_;
|
||||
};
|
||||
|
||||
} // namespace csp::services
|
||||
在新工单中引用
屏蔽一个用户