38 lines
771 B
Python
38 lines
771 B
Python
import uuid
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class AuditLogResponse(BaseModel):
|
|
id: uuid.UUID
|
|
timestamp: datetime
|
|
member_id: Optional[uuid.UUID]
|
|
member_email: Optional[str]
|
|
action_type: str
|
|
area: str
|
|
description: str
|
|
status: str
|
|
booking_id: Optional[uuid.UUID]
|
|
error_message: Optional[str]
|
|
error_detail: Optional[str]
|
|
ip_address: Optional[str]
|
|
user_agent: Optional[str]
|
|
extra: Optional[dict]
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class AuditLogPage(BaseModel):
|
|
items: list[AuditLogResponse]
|
|
total: int
|
|
page: int
|
|
page_size: int
|
|
total_pages: int
|
|
|
|
|
|
class PageVisitSchema(BaseModel):
|
|
path: str
|
|
title: Optional[str] = None
|