49 lines
982 B
C++
49 lines
982 B
C++
#pragma once
|
|
#include <string>
|
|
#include <time.h>
|
|
#include "../external/SQLiteCpp/SQLiteCpp.h"
|
|
|
|
using namespace std;
|
|
class LogImage
|
|
{
|
|
public:
|
|
enum ImageType {
|
|
COVERED=0,
|
|
PRINTED
|
|
};
|
|
LogImage();
|
|
~LogImage();
|
|
static void CreateIfNoExist(SQLite::Database* db);
|
|
|
|
public:
|
|
long m_Id;
|
|
time_t m_InsertTime;
|
|
long m_JobId;
|
|
ImageType m_Type;
|
|
int m_LayerIndex;
|
|
|
|
unsigned char* m_Image;
|
|
unsigned long m_ImageLength;
|
|
|
|
public:
|
|
static const string IMAGE_TABLE_NAME;
|
|
static const string IMAGE_FIELD_ID;
|
|
static const string IMAGE_FIELD_INSERT_TIME;
|
|
static const string IMAGE_FIELD_JOB_ID;
|
|
static const string IMAGE_FIELD_IMAGE_TYPE;
|
|
static const string IMAGE_FIELD_LAYER_INDEX;
|
|
static const string IMAGE_FIELD_IMAGE;
|
|
};
|
|
|
|
class ImageInfo {
|
|
public:
|
|
ImageInfo();
|
|
~ImageInfo();
|
|
static void CreateIfNoExist(SQLite::Database* db);
|
|
|
|
public:
|
|
static const string TABLE_NAME;
|
|
static const string FIELD_ID;
|
|
static const string FIELD_INSERT_TIME;
|
|
static const string FIELD_JOB_ID;
|
|
}; |