qswiki/database/userdao.h

21 行
429 B
C
Raw 通常表示 履歴

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