Запись в БД многие ко многими

This commit is contained in:
2025-08-05 00:06:02 +05:00
parent 0198f6d022
commit 96bdf1e5e8
9 changed files with 217 additions and 202 deletions

View File

@@ -11,7 +11,6 @@
struct Book_SZ
{
SH<Author_S> author;
QString title;
SH<Series_S> series;
quint8 year;
@@ -27,7 +26,6 @@ public:
Book_S() = default;
Book_S(const Book_SZ& book)
{
m_author = book.author;
m_title = book.title;
m_series = book.series;
m_year = book.year;
@@ -39,9 +37,6 @@ public:
quint64 id() const { return m_id; }
void setId(const quint64& newId) { m_id = newId; }
SH<Author_S> author() const { return m_author; }
void setAuthor(const SH<Author_S>& newAuthor) { m_author = newAuthor; }
QString title() const { return m_title; }
void setTitle(const QString& newTitle) { m_title = newTitle; }
@@ -63,11 +58,11 @@ public:
private:
friend class odb::access;
// public: // for Redkit-gen
private:
#pragma db id auto
quint64 m_id;
SH<Author_S> m_author;
QString m_title;
SH<Series_S> m_series;
quint8 m_year;