Production
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from app.common.enums import AuditAction, EntityType
|
||||
|
||||
|
||||
class AuditLogRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: uuid.UUID
|
||||
actor_user_id: uuid.UUID
|
||||
entity_type: EntityType
|
||||
entity_id: uuid.UUID
|
||||
action: AuditAction
|
||||
comment: str | None
|
||||
before_data: dict[str, Any] | None
|
||||
after_data: dict[str, Any] | None
|
||||
ip_address: str | None
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class ApprovalHistoryItem(BaseModel):
|
||||
"""The approval trail as shown on S7 and printed in the PDF."""
|
||||
|
||||
action: AuditAction
|
||||
actor_name: str
|
||||
actor_role: str
|
||||
comment: str | None
|
||||
at: datetime
|
||||
Reference in New Issue
Block a user