32 #pragma db object polymorphic callback(odb_callback) 40 static std::shared_ptr<ZoneEvent>
52 virtual void before(
const std::string &repr)
override;
54 virtual void after(
const std::string &repr)
override;
56 virtual const std::string &
before()
const override;
58 virtual const std::string &
after()
const override;
68 #pragma db on_delete(set_null)
Implementation of IAuditEntry, backed by ODB.
std::shared_ptr< IZone > IZonePtr
This is the header file for a generated source file, GitSHA1.cpp.
virtual void target(Auth::IZonePtr zone) override
Set the zone that is targeted by the event.
virtual const std::string & before() const override
Provides an implementation of IZoneEvent.
virtual std::string generate_description() const override
Generate a description for this event.
virtual ~ZoneEvent()=default
Auth::ZoneId target_zone_id_
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
virtual Auth::ZoneId target_id() const override
std::string after_
Optional JSON dump of the object after the event took place.
Interface that describes an Audit object for zone related event.
std::shared_ptr< AuditEntry > AuditEntryPtr
static std::shared_ptr< ZoneEvent > create(const DBPtr &database, Auth::IZonePtr target_zone, AuditEntryPtr parent)
std::string generate_target_description() const
Generate a short description for the targeted zone.
std::shared_ptr< odb::database > DBPtr
static std::shared_ptr< ZoneEvent > create_empty()
std::string before_
Optional JSON dump of the object before the event took place.
odb::lazy_weak_ptr< Zone > ZoneLWPtr
void database(DBPtr db)
Set the database pointer.
Provide static methods to instanciate various Audit objects.
virtual const std::string & after() const override