Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/strategy equal parts #69

Merged
merged 8 commits into from
Jun 18, 2024
Merged

Conversation

saantim
Copy link
Contributor

@saantim saantim commented Jun 16, 2024

No description provided.

@saantim saantim requested review from ovr4ulin, gabokatta and MegaRedHand and removed request for ovr4ulin and gabokatta June 16, 2024 21:38
src/crud.py Outdated Show resolved Hide resolved
src/main.py Outdated Show resolved Hide resolved
@@ -88,7 +89,7 @@ class RecurringSpending(Base):
owner_id = Column(ForeignKey("users.id"))
group_id = Column(ForeignKey("groups.id"))
category_id = Column(ForeignKey("categories.id"))
amount = Column(Integer)
amount = Column(Float)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debería ser un entero.


class Distribution(TypedDict):
user_id: int
value: float
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Que sea un int entre 0 y 100

src/schemas.py Outdated

class UniqueSpendingBase(BaseModel):
amount: int
description: str
date: Optional[datetime] = Field(None)
group_id: int
category_id: int
strategy_data: Optional[List[Distribution]] = Field(None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podemos moverlo a CreateUniqueSpending, y no guardarlo en la DB

src/test_main.py Show resolved Hide resolved
ovr4ulin
ovr4ulin previously approved these changes Jun 17, 2024
@saantim saantim merged commit 9de0a07 into develop Jun 18, 2024
1 check passed
@saantim saantim deleted the feature/strategy-equal-parts branch June 18, 2024 01:12
@ovr4ulin
Copy link
Contributor

Agregar los test para los distintos tipos de gastos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants