00001 #ifndef EMPRUNT_H 00002 #define EMPRUNT_H 00003 00004 #include "modele.h" 00005 00006 #include <QDateTime> 00007 00008 struct EmpruntInfo 00009 { 00010 QString name; 00011 QString cote; 00012 QString serie; 00013 }; 00014 00015 class Emprunt : public Modele 00016 { 00017 public: 00018 Emprunt(); 00019 00020 virtual bool creer() { return false; } 00021 virtual bool modifier() const { return false; } 00022 virtual bool supprimer() { return false; } 00023 //virtual static bool supprimer(int id) {} 00024 00025 static QList< Emprunt > listEmprunt(int idUser); 00026 //static QList< Emprunt > listEmpruntAlbum(int idAlbum); // ou book => pour stat plutot album 00027 00028 static void listOut(QStringList &out, QStringList &late, QStringList &adresses); 00029 00030 void charger(int id); 00031 00032 int idUser() const { return m_user; } 00033 int idBook() const { return m_book; } 00034 QDateTime dateBorrow() const { return m_dateBorrow; } 00035 QDateTime dateRetour() const { return m_dateRetour; } 00036 EmpruntInfo empruntInfo() const { return m_empruntInfo; } 00037 00038 protected: 00039 int m_user; 00040 int m_book; 00041 QDateTime m_dateBorrow; 00042 QDateTime m_dateRetour; 00043 EmpruntInfo m_empruntInfo; 00044 }; 00045 00046 #endif // EMPRUNT_H
1.7.1