#include "hblastrecorddet.h"

HBlastRecordDet::HBlastRecordDet(QObject *parent) : QObject(parent)
{
    // 可以在这里进行一些初始化操作
}

qint64 HBlastRecordDet::getId() const
{
    return id;
}

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

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

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

QString HBlastRecordDet::getOutCode() const
{
    return outCode;
}

void HBlastRecordDet::setOutCode(const QString &newOutCode)
{
    outCode = newOutCode;
}

QString HBlastRecordDet::getInnerCode() const
{
    return innerCode;
}

void HBlastRecordDet::setInnerCode(const QString &newInnerCode)
{
    innerCode = newInnerCode;
}

QString HBlastRecordDet::getUid() const
{
    return uid;
}

void HBlastRecordDet::setUid(const QString &newUid)
{
    uid = newUid;
}

QString HBlastRecordDet::getStatus() const
{
    return status;
}

void HBlastRecordDet::setStatus(const QString &newStatus)
{
    status = newStatus;
}

QString HBlastRecordDet::getFreq() const
{
    return freq;
}

void HBlastRecordDet::setFreq(const QString &newFreq)
{
    freq = newFreq;
}

QString HBlastRecordDet::getDelayTime() const
{
    return delayTime;
}

void HBlastRecordDet::setDelayTime(const QString &newDelayTime)
{
    delayTime = newDelayTime;
}

QString HBlastRecordDet::getTag() const
{
    return tag;
}

void HBlastRecordDet::setTag(const QString &newTag)
{
    tag = newTag;
}

int HBlastRecordDet::getBlastRecordId() const
{
    return blastRecordId;
}

void HBlastRecordDet::setBlastRecordId(int newBlastRecordId)
{
    blastRecordId = newBlastRecordId;
}

int HBlastRecordDet::getRegId() const
{
    return regId;
}

void HBlastRecordDet::setRegId(int newRegId)
{
    regId = newRegId;
}

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

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

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

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

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

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

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

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

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

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

QByteArray HBlastRecordDet::BlastRecordDetToJson(const HBlastRecordDet &recordDet)
{
    QJsonObject jsonObject;
    jsonObject["id"] = recordDet.getId();
    jsonObject["uuid"] = recordDet.getUuid();
    jsonObject["out_code"] = recordDet.getOutCode();
    jsonObject["inner_code"] = recordDet.getInnerCode();
    jsonObject["uid"] = recordDet.getUid();
    jsonObject["status"] = recordDet.getStatus();
    jsonObject["freq"] = recordDet.getFreq();
    jsonObject["delay_time"] = recordDet.getDelayTime();
    jsonObject["tag"] = recordDet.getTag();
    jsonObject["blast_record_id"] = recordDet.getBlastRecordId();
    jsonObject["reg_id"] = recordDet.getRegId();
    jsonObject["created_at"] = recordDet.getCreatedAt().toString(Qt::ISODateWithMs);
    jsonObject["updated_at"] = recordDet.getUpdatedAt().toString(Qt::ISODateWithMs);
    jsonObject["deleted_at"] = recordDet.getDeletedAt().toString(Qt::ISODateWithMs);
    jsonObject["create_by"] = recordDet.getCreateBy();
    jsonObject["update_by"] = recordDet.getUpdateBy();

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