Добавлена таблица Settings
This commit is contained in:
@@ -28,11 +28,11 @@
|
|||||||
using oDBase = odb::sqlite::database;
|
using oDBase = odb::sqlite::database;
|
||||||
using uDBase = U<oDBase>;
|
using uDBase = U<oDBase>;
|
||||||
|
|
||||||
#include <model/author_book_s-odb.hxx>
|
#include <model/books/author_book_s-odb.hxx>
|
||||||
#include <model/author_book_s.h>
|
#include <model/books/author_book_s.h>
|
||||||
#include <model/author_s-odb.hxx>
|
#include <model/books/author_s-odb.hxx>
|
||||||
#include <model/author_s.h>
|
#include <model/books/author_s.h>
|
||||||
#include <model/book_s-odb.hxx>
|
#include <model/books/book_s-odb.hxx>
|
||||||
#include <model/book_s.h>
|
#include <model/books/book_s.h>
|
||||||
|
|
||||||
void DATABASE_EXPORT addBook(oDBase& db, const QString title, const QVector<QString>& authors);
|
void DATABASE_EXPORT addBook(oDBase& db, const QString title, const QVector<QString>& authors);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef AUTHOR_BOOK_H
|
#ifndef AUTHOR_BOOK_H
|
||||||
#define AUTHOR_BOOK_H
|
#define AUTHOR_BOOK_H
|
||||||
|
|
||||||
#include "model_global.h"
|
#include <model/model_global.h>
|
||||||
|
|
||||||
#include "author_s.h"
|
#include "author_s.h"
|
||||||
#include "book_s.h"
|
#include "book_s.h"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef AUTHOR_S_H
|
#ifndef AUTHOR_S_H
|
||||||
#define AUTHOR_S_H
|
#define AUTHOR_S_H
|
||||||
|
|
||||||
#include "model_global.h"
|
#include <model/model_global.h>
|
||||||
|
|
||||||
// @JsonSerializer
|
// @JsonSerializer
|
||||||
class Author_S;
|
class Author_S;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef BOOK_S_H
|
#ifndef BOOK_S_H
|
||||||
#define BOOK_S_H
|
#define BOOK_S_H
|
||||||
|
|
||||||
#include "model_global.h"
|
#include <model/model_global.h>
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef GENRE_H
|
#ifndef GENRE_H
|
||||||
#define GENRE_H
|
#define GENRE_H
|
||||||
|
|
||||||
#include "model_global.h"
|
#include <model/model_global.h>
|
||||||
|
|
||||||
#pragma db object
|
#pragma db object
|
||||||
class MODEL_EXPORT Genre_S
|
class MODEL_EXPORT Genre_S
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SERIES_H
|
#ifndef SERIES_H
|
||||||
#define SERIES_H
|
#define SERIES_H
|
||||||
|
|
||||||
#include "model_global.h"
|
#include <model/model_global.h>
|
||||||
|
|
||||||
#pragma db object
|
#pragma db object
|
||||||
class MODEL_EXPORT Series_S
|
class MODEL_EXPORT Series_S
|
||||||
@@ -26,12 +26,21 @@ PSLibrary {
|
|||||||
odb.gen.databases: "sqlite"
|
odb.gen.databases: "sqlite"
|
||||||
cpp.cxxLanguageVersion: "c++17"
|
cpp.cxxLanguageVersion: "c++17"
|
||||||
|
|
||||||
|
Group {
|
||||||
|
id: headers
|
||||||
|
name: "headers"
|
||||||
|
files: [
|
||||||
|
"model_global.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
id: odbs
|
id: odbs
|
||||||
name: "odb"
|
name: "odb"
|
||||||
files: [
|
files: [
|
||||||
"**/*.h",
|
"**/*.h",
|
||||||
]
|
]
|
||||||
|
excludeFiles: headers.files
|
||||||
fileTags: ["hpp", "odbxx", "rgen"]
|
fileTags: ["hpp", "odbxx", "rgen"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
23
src/model/settings/settings.h
Normal file
23
src/model/settings/settings.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef SETTINGS_S_H
|
||||||
|
#define SETTINGS_S_H
|
||||||
|
|
||||||
|
#include <model/model_global.h>
|
||||||
|
|
||||||
|
#pragma db object
|
||||||
|
class MODEL_EXPORT Settings_S
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Settings_S() = default;
|
||||||
|
|
||||||
|
quint64 id() const { return m_id; }
|
||||||
|
void setId(const quint64& newId) { m_id = newId; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class odb::access;
|
||||||
|
|
||||||
|
private:
|
||||||
|
#pragma db id auto
|
||||||
|
quint64 m_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SETTINGS_S_H
|
||||||
@@ -5,10 +5,10 @@
|
|||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
|
|
||||||
#include <model/author_s-odb.hxx> // Должен быть здесь
|
#include <model/books/author_s-odb.hxx> // Должен быть здесь
|
||||||
#include <model/author_s.h>
|
#include <model/books/author_s.h>
|
||||||
#include <model/book_s-odb.hxx> // Должен быть здесь
|
#include <model/books/book_s-odb.hxx> // Должен быть здесь
|
||||||
#include <model/book_s.h>
|
#include <model/books/book_s.h>
|
||||||
|
|
||||||
#include <odb/core.hxx>
|
#include <odb/core.hxx>
|
||||||
#include <odb/database.hxx>
|
#include <odb/database.hxx>
|
||||||
|
|||||||
Reference in New Issue
Block a user