qswiki/database/userdao.h

19 baris
427 B
C

2018-11-03 17:12:20 +01:00
#ifndef USERDAO_H
#define USERDAO_H
#include <string>
#include <optional>
#include "../user.h"
class UserDao
{
public:
UserDao();
virtual bool exists(std::string username) = 0;
virtual std::optional<User> find(std::string username) = 0;
virtual std::optional<User> find(int id) = 0;
virtual void deleteUser(std::string username) = 0;
virtual void save(const User &u) = 0;
virtual ~UserDao(){};
};
#endif // USERDAO_H