#ifndef EMGAUWA_CORE_SCHEDULE_DBO_H #define EMGAUWA_CORE_SCHEDULE_DBO_H #include #include #include #include #include #include "period.h" #include "period_list.h" class schedule_dbo { public: int id; uuid_t uid; char name[128]; period_list *periods; bool update(); bool insert(); bool remove(); ~schedule_dbo(); Json::Value to_json(); static void free_list(schedule_dbo **schedules_list); static schedule_dbo** get_by_simple(const char *key, const void *value, intptr_t bind_func, int bind_func_param); static schedule_dbo* get_by_id_or_off(int id); static schedule_dbo* get_by_id(int id); static schedule_dbo** get_by(helpers::sql_filter_builder **filters); static schedule_dbo** get_all(); static int parse_uid(const char *uid_str, uuid_t result); static void unparse_uid(const uuid_t uid, char *result); }; #endif //EMGAUWA_CORE_SCHEDULE_DBO_H