mirror of
https://github.com/creyD/apilog.git
synced 2026-04-12 19:30:29 +02:00
feat: added logging API
This commit is contained in:
@@ -23,11 +23,15 @@ class LogEntry(Base):
|
||||
application = Column(
|
||||
UUID(as_uuid=True), ForeignKey("application.id", ondelete="CASCADE"), nullable=False
|
||||
)
|
||||
|
||||
t_type = Column(Enum(TransactionType), nullable=False, default=TransactionType.UNDEFINED)
|
||||
# type of the log entry
|
||||
l_type = Column(Enum(LogType), nullable=False, default=LogType.INFO)
|
||||
|
||||
# type of the transaction
|
||||
t_type = Column(Enum(TransactionType), nullable=False, default=TransactionType.UNDEFINED)
|
||||
# a custom logmessage
|
||||
message = Column(String(512), nullable=True)
|
||||
# author ID i.e. auth0 user sub
|
||||
author = Column(String(512), nullable=False, default="system")
|
||||
|
||||
# optional reference to the object (like object ID)
|
||||
object_reference = Column(String(512), nullable=True)
|
||||
# for irreversible operations, store the object state before the operation
|
||||
previous_object = Column(JSON, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user