Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
binayak9932 committed Oct 31, 2024
1 parent df025ff commit 62e1167
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 187 deletions.
13 changes: 6 additions & 7 deletions apps/data_handler/db/models/zklend_events.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from decimal import Decimal

from data_handler.db.models.event import EventBaseModel
from sqlalchemy import Numeric, String
from sqlalchemy.orm import Mapped, mapped_column

from data_handler.db.models.event import EventBaseModel


class AccumulatorsSyncEventData(EventBaseModel):
"""
Expand Down Expand Up @@ -49,7 +48,7 @@ class RepaymentEventData(EventBaseModel):
and the amounts in raw and face formats.
"""

__tablename__ = "repayment_event_data"
__tablename__ = "repayment_event"

repayer: Mapped[str] = mapped_column(String, nullable=False)
beneficiary: Mapped[str] = mapped_column(String, nullable=False)
Expand All @@ -66,7 +65,7 @@ class DepositEventData(EventBaseModel):
token, and the face amount of the deposit.
"""

__tablename__ = "deposit_event_data"
__tablename__ = "deposit_event"

user: Mapped[str] = mapped_column(String, nullable=False)
token: Mapped[str] = mapped_column(String, nullable=False)
Expand All @@ -81,7 +80,7 @@ class BorrowingEventData(EventBaseModel):
token, and amounts in raw and face formats.
"""

__tablename__ = "borrowing_event_data"
__tablename__ = "borrowing_event"

user: Mapped[str] = mapped_column(String, nullable=False)
token: Mapped[str] = mapped_column(String, nullable=False)
Expand All @@ -97,7 +96,7 @@ class WithdrawalEventData(EventBaseModel):
token, and the amount withdrawn.
"""

__tablename__ = "withdrawal_event_data"
__tablename__ = "withdrawal_event"

user: Mapped[str] = mapped_column(String, nullable=False)
amount: Mapped[Decimal] = mapped_column(Numeric(38, 18), nullable=False)
Expand All @@ -112,7 +111,7 @@ class CollateralEnabledDisabledEventData(EventBaseModel):
the user address and the token involved.
"""

__tablename__ = "collateral_enabled_disabled_event_data"
__tablename__ = "collateral_enabled_disabled_event"

user: Mapped[str] = mapped_column(String, nullable=False)
token: Mapped[str] = mapped_column(String, nullable=False)
Loading

0 comments on commit 62e1167

Please sign in to comment.