#include "hproject.h"

HProject::HProject(QObject *parent) : QObject(parent),
    id(0),
    createBy(0),
    updateBy(0)
{
}

// Getter and Setter implementations
qint64 HProject::getId() const
{
    return id;
}

void HProject::setId(qint64 newId)
{
    id = newId;
}

QString HProject::getUuid() const
{
    return uuid;
}

void HProject::setUuid(const QString &newUuid)
{
    uuid = newUuid;
}

QString HProject::getName() const
{
    return name;
}

void HProject::setName(const QString &newName)
{
    name = newName;
}

QString HProject::getCompanyCode() const
{
    return companyCode;
}

void HProject::setCompanyCode(const QString &newCompanyCode)
{
    companyCode = newCompanyCode;
}

QString HProject::getHtid() const
{
    return htid;
}

void HProject::setHtid(const QString &newHtid)
{
    htid = newHtid;
}

QString HProject::getXmbh() const
{
    return xmbh;
}

void HProject::setXmbh(const QString &newXmbh)
{
    xmbh = newXmbh;
}

QString HProject::getOperatorName() const
{
    return operatorName;
}

void HProject::setOperatorName(const QString &newOperatorName)
{
    operatorName = newOperatorName;
}

QString HProject::getOperatorIdentity() const
{
    return operatorIdentity;
}

void HProject::setOperatorIdentity(const QString &newOperatorIdentity)
{
    operatorIdentity = newOperatorIdentity;
}

QString HProject::getBlasterName() const
{
    return blasterName;
}

void HProject::setBlasterName(const QString &newBlasterName)
{
    blasterName = newBlasterName;
}

QString HProject::getBlasterIdentity() const
{
    return blasterIdentity;
}

void HProject::setBlasterIdentity(const QString &newBlasterIdentity)
{
    blasterIdentity = newBlasterIdentity;
}

QString HProject::getAddressUuid() const
{
    return addressUuid;
}

void HProject::setAddressUuid(const QString &newAddressUuid)
{
    addressUuid = newAddressUuid;
}

QString HProject::getPcSn() const
{
    return pcSn;
}

void HProject::setPcSn(const QString &newPcSn)
{
    pcSn = newPcSn;
}

QString HProject::getDetSum() const
{
    return detSum;
}

void HProject::setDetSum(const QString &newDetSum)
{
    detSum = newDetSum;
}

QString HProject::getFileName() const
{
    return fileName;
}

void HProject::setFileName(const QString &newFileName)
{
    fileName = newFileName;
}

QString HProject::getFileUrl() const
{
    return fileUrl;
}

void HProject::setFileUrl(const QString &newFileUrl)
{
    fileUrl = newFileUrl;
}

QString HProject::getBlastStatus() const
{
    return blastStatus;
}

void HProject::setBlastStatus(const QString &newBlastStatus)
{
    blastStatus = newBlastStatus;
}

QDateTime HProject::getCreatedAt() const
{
    return createdAt;
}

void HProject::setCreatedAt(const QDateTime &newCreatedAt)
{
    createdAt = newCreatedAt;
}

QDateTime HProject::getUpdatedAt() const
{
    return updatedAt;
}

void HProject::setUpdatedAt(const QDateTime &newUpdatedAt)
{
    updatedAt = newUpdatedAt;
}

QDateTime HProject::getDeletedAt() const
{
    return deletedAt;
}

void HProject::setDeletedAt(const QDateTime &newDeletedAt)
{
    deletedAt = newDeletedAt;
}

qint64 HProject::getCreateBy() const
{
    return createBy;
}

void HProject::setCreateBy(qint64 newCreateBy)
{
    createBy = newCreateBy;
}

qint64 HProject::getUpdateBy() const
{
    return updateBy;
}

void HProject::setUpdateBy(qint64 newUpdateBy)
{
    updateBy = newUpdateBy;
}

QByteArray HProject::ProjectToJson(const HProject& project) {
    QJsonObject jsonObject;
    jsonObject["name"] = project.getName();
    jsonObject["detSum"] = project.getDetSum();
    jsonObject["blasterName"] = project.getBlasterName();
    jsonObject["operatorName"] = project.getOperatorName();
    jsonObject["address"] = project.getAddressUuid();
    jsonObject["blasterIdentity"] = project.getBlasterIdentity();
    jsonObject["operatorIdentity"] = project.getOperatorIdentity();

    QJsonDocument jsonDoc(jsonObject);
    return jsonDoc.toJson(QJsonDocument::Compact);
}
