#ifndef AIRPORT_H
#define AIRPORT_H

#include "QxOrm.h"
#include "precompiled.h"

class Airport
{

   QX_REGISTER_FRIEND_CLASS(Airport)

protected:

   double m_ID;
   QString m_NAME;
   double m_LONGITUDE;
   double m_LATITUDE;
   double m_HEIGHT;
   QString m_NATION;
   QString m_ISDELETE;
   QDateTime m_IMPORTTIME;
   QString m_NOTE;

public:

   Airport();
   Airport(const double & id);
   virtual ~Airport();

   double getID() const;
   QString getNAME() const;
   double getLONGITUDE() const;
   double getLATITUDE() const;
   double getHEIGHT() const;
   QString getNATION() const;
   QString getISDELETE() const;
   QDateTime getIMPORTTIME() const;
   QString getNOTE() const;

   void setID(const double & val);
   void setNAME(const QString & val);
   void setLONGITUDE(const double & val);
   void setLATITUDE(const double & val);
   void setHEIGHT(const double & val);
   void setNATION(const QString & val);
   void setISDELETE(const QString & val);
   void setIMPORTTIME(const QDateTime & val);
   void setNOTE(const QString & val);

public:

   static QString column_ID(bool key = false) { Q_UNUSED(key); return "ID"; }
   static QString column_NAME(bool key = false) { Q_UNUSED(key); return "NAME"; }
   static QString column_LONGITUDE(bool key = false) { Q_UNUSED(key); return "LONGITUDE"; }
   static QString column_LATITUDE(bool key = false) { Q_UNUSED(key); return "LATITUDE"; }
   static QString column_HEIGHT(bool key = false) { Q_UNUSED(key); return "HEIGHT"; }
   static QString column_ISDELETE(bool key = false) { Q_UNUSED(key); return "ISDELETE"; }
   static QString column_IMPORTTIME(bool key = false) { Q_UNUSED(key); return "IMPORTTIME"; }
   static QString column_NOTE(bool key = false) { Q_UNUSED(key); return "NOTE"; }

public:

   static QString table_name(bool key = false) { return (key ? QString("Airport") : QString("T_CM_AIRPORT")); }

};

typedef std::shared_ptr<Airport> Airport_ptr;
typedef qx::QxCollection<double, Airport_ptr> list_of_Airport;
typedef std::shared_ptr<list_of_Airport> list_of_Airport_ptr;

QX_REGISTER_PRIMARY_KEY(Airport, double)
QX_REGISTER_HPP_USER(Airport, qx::trait::no_base_class_defined, 0)

#endif // AIRPORT_H
