Bootstrap Python project and add base domain model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Shared base classes for the Meeting Assistant domain model."""
|
||||
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
@@ -8,7 +8,7 @@ from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
def utc_now() -> datetime:
|
||||
"""Return the current time as a timezone-aware UTC datetime."""
|
||||
return datetime.now(timezone.utc)
|
||||
return datetime.now(UTC)
|
||||
|
||||
|
||||
class DomainModel(BaseModel):
|
||||
@@ -22,4 +22,4 @@ class DomainModel(BaseModel):
|
||||
|
||||
id: UUID = Field(default_factory=uuid4)
|
||||
created_at: datetime = Field(default_factory=utc_now)
|
||||
updated_at: datetime = Field(default_factory=utc_now)
|
||||
updated_at: datetime = Field(default_factory=utc_now)
|
||||
Reference in New Issue
Block a user