#ifndef MODELS_H
#define MODELS_H

#include <QObject>
#include <QDateTime>
#include <QMap>
#include <QVariant>
#include <vector>

struct Human
{
  // Empty if not a registered human
  QString id;
  QString email;
  QString emailPrefix;
};

struct Stream
{
  QString id;
  QString name;
  QString description;
  bool isOpen;
  std::vector<QString> memberEmails;
  int unseenCount;
};

struct Particle
{
  QString id;
  QMap<QString, QVariant> data;
  QString type;
  QString createdByEmail;
  bool seen;
  std::vector<QString> ackedByEmails;
  QDateTime updatedAt;
  QDateTime createdAt;
};

struct Network
{
  QString id;
  QString name;
  Human admin;
  std::vector<Human> members;
  int openStreamCount;
  int openStreamCapacity;
  std::vector<Stream> streams;
};

#endif //MODELS_H
