diff --git a/src/application/domain/entities/user.py b/src/application/domain/entities/user.py index 5247505..a9576c6 100644 --- a/src/application/domain/entities/user.py +++ b/src/application/domain/entities/user.py @@ -21,6 +21,8 @@ class UserEntity: inn: str | None = None erc20: str | None = None + avatar_link: str | None = None + kyc_verified: bool | None = None is_deleted: bool | None = None diff --git a/src/infrastructure/cache/keydb_client.py b/src/infrastructure/cache/keydb_client.py index b5f0e85..34a06ee 100644 --- a/src/infrastructure/cache/keydb_client.py +++ b/src/infrastructure/cache/keydb_client.py @@ -45,6 +45,7 @@ class KeydbCache(ICache): 'passport_data': user.passport_data, 'inn': user.inn, 'erc20': user.erc20, + 'avatar_link': user.avatar_link, 'kyc_verified': user.kyc_verified, 'is_deleted': user.is_deleted, 'created_at': user.created_at.isoformat() if user.created_at else None, diff --git a/src/infrastructure/cache/remote_cache.py b/src/infrastructure/cache/remote_cache.py index b37ff98..bc0b2af 100644 --- a/src/infrastructure/cache/remote_cache.py +++ b/src/infrastructure/cache/remote_cache.py @@ -58,6 +58,7 @@ class RemoteCache(ICache): 'passport_data': user.passport_data, 'inn': user.inn, 'erc20': user.erc20, + 'avatar_link': user.avatar_link, 'kyc_verified': user.kyc_verified, 'is_deleted': user.is_deleted, 'created_at': user.created_at.isoformat() if user.created_at else None, diff --git a/src/infrastructure/database/models/user.py b/src/infrastructure/database/models/user.py index a9d2326..65e77c3 100644 --- a/src/infrastructure/database/models/user.py +++ b/src/infrastructure/database/models/user.py @@ -24,6 +24,8 @@ class UserModel(Base, UlidPrimaryKeyMixin, AuditTimestampsMixin, SoftDeleteMixin inn: Mapped[str | None] = mapped_column(String(12), nullable=True) erc20: Mapped[str | None] = mapped_column(String(255), nullable=True) + avatar_link: Mapped[str | None] = mapped_column(String(2048), nullable=True) + kyc_verified: Mapped[bool] = mapped_column(Boolean, nullable=False, server_default='false', default=False) kyc_verified_at: Mapped[DateTime | None] = mapped_column(DateTime(timezone=True), nullable=True) diff --git a/src/infrastructure/database/repositories/user_repository.py b/src/infrastructure/database/repositories/user_repository.py index 6d8a9cc..3f4179a 100644 --- a/src/infrastructure/database/repositories/user_repository.py +++ b/src/infrastructure/database/repositories/user_repository.py @@ -29,6 +29,7 @@ class UserRepository(IUserRepository): passport_data=model.passport_data, inn=model.inn, erc20=model.erc20, + avatar_link=model.avatar_link, kyc_verified=model.kyc_verified, is_deleted=model.is_deleted, created_at=model.created_at,