79 lines
2.0 KiB
C++
79 lines
2.0 KiB
C++
#ifndef DEVICE_H
|
|
#define DEVICE_H
|
|
|
|
#include <QString>
|
|
#include <QDateTime>
|
|
|
|
#include "devicemodel.h"
|
|
#include "baseentity.h"
|
|
|
|
class Device : public BaseEntity
|
|
{
|
|
public:
|
|
Device();
|
|
virtual ~Device();
|
|
|
|
QString serialNumber() const;
|
|
void setSerialNumber(const QString &newSerialNumber);
|
|
|
|
QDateTime purchaseDate() const;
|
|
void setPurchaseDate(const QDateTime &newPurchaseDate);
|
|
|
|
double price() const;
|
|
void setPrice(double newPrice);
|
|
|
|
QDateTime warrantyExpireDate() const;
|
|
void setWarrantyExpireDate(const QDateTime &newWarrantyExpireDate);
|
|
|
|
bool isWorking() const;
|
|
void setIsWorking(bool newIsWorking);
|
|
|
|
QString furtherInformation() const;
|
|
void setFurtherInformation(const QString &newFurtherInformation);
|
|
|
|
int idLocation() const;
|
|
void setIdLocation(int newIdLocation);
|
|
|
|
QString nameLocation() const;
|
|
void setNameLocation(const QString &newNameLocation);
|
|
|
|
int idEmployee() const;
|
|
void setIdEmployee(int newIdEmployee);
|
|
|
|
QString nameEmployee() const;
|
|
void setNameEmployee(const QString &newNameEmployee);
|
|
|
|
int idDepartment() const;
|
|
void setIdDepartment(int newIdDepartment);
|
|
|
|
QString nameDepartment() const;
|
|
void setNameDepartment(const QString &newNameDepartment);
|
|
|
|
DeviceModel deviceModel() const;
|
|
void setDeviceModel(const DeviceModel &newDeviceModel);
|
|
|
|
bool isLiked() const;
|
|
void setIsLiked(bool newIsLiked);
|
|
|
|
void fromJson(const QJsonObject &json) override;
|
|
QJsonObject toJson() const override;
|
|
|
|
private:
|
|
QString _serialNumber = "";
|
|
QDateTime _purchaseDate = QDateTime();
|
|
double _price = 1;
|
|
QDateTime _warrantyExpireDate = QDateTime();
|
|
bool _isWorking = true;
|
|
QString _furtherInformation = "";
|
|
int _idLocation = 0;
|
|
QString _nameLocation = "";
|
|
int _idEmployee = 0;
|
|
QString _nameEmployee = "";
|
|
int _idDepartment = 0;
|
|
QString _nameDepartment = "";
|
|
DeviceModel _deviceModel;
|
|
bool _isLiked = false;
|
|
};
|
|
|
|
#endif // DEVICE_H
|