Skip to content

Commit

Permalink
Merge pull request #55 from coder1963/bump-pydantic
Browse files Browse the repository at this point in the history
bump sqlmodel / pydantic / fastapi
  • Loading branch information
robcxyz authored Nov 14, 2024
2 parents d4b9719 + 7e8f313 commit e82eadd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions icon_governance/models/preps.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ class Prep(SQLModel, table=True):

# Blocks
failure_count: Optional[int] = Field(None)
penalties: int = Field(None)
penalties: Optional[int] = Field(None)

# Rewards
reward_monthly: float = Field(None)
reward_monthly_usd: float = Field(None)
reward_daily: float = Field(None)
reward_daily_usd: float = Field(None)
reward_monthly: Optional[float] = Field(None)
reward_monthly_usd: Optional[float] = Field(None)
reward_daily: Optional[float] = Field(None)
reward_daily_usd: Optional[float] = Field(None)

stakers: Optional[int] = Field(None)
bonders: Optional[int] = Field(None)
Expand Down
6 changes: 3 additions & 3 deletions icon_governance/models/rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

class Reward(SQLModel, table=True):
tx_hash: Optional[str] = Field(primary_key=True)
address: Optional[str] = Field(..., index=True)
address: Optional[str] = Field(..., index=True, nullable=False)
block: Optional[int] = Field(None)
timestamp: Optional[int] = Field(None)

# Come from Tx logs
value: condecimal(max_digits=10, decimal_places=3) = Field(None)
iscore: condecimal(max_digits=13, decimal_places=3) = Field(None)
value: Optional[condecimal(max_digits=10, decimal_places=3)] = Field(None)
iscore: Optional[condecimal(max_digits=13, decimal_places=3)] = Field(None)

@declared_attr
def __tablename__(cls) -> str: # noqa: N805
Expand Down

0 comments on commit e82eadd

Please sign in to comment.