aboutsummaryrefslogtreecommitdiff
path: root/qt/person.hxx
blob: 28460c4d690851b67136546aa1302f3bc962a9d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// file      : qt/person.hxx
// author    : Constantin Michael <constantin@codesynthesis.com>
// copyright : not copyrighted - public domain

#ifndef EMPLOYEE_HXX
#define EMPLOYEE_HXX

#include <QString>
#include <QDate>
#include <QTime>
#include <QDateTime>

#pragma db object
struct time_punchcard
{
  #pragma db id auto
  unsigned long id;

  QDateTime date_time;
};

#pragma db object
struct person
{
  bool
  operator== (const person& x) const
  {
    return name == x.name &&
      date_of_birth == x.date_of_birth &&
      time_of_birth == x.time_of_birth;
  }

  #pragma db id
  QString name;

  #pragma db type("DATE NOT NULL")
  QDate date_of_birth;
  QTime time_of_birth;
};

#endif // EMPLOYEE_HXX