Spaces:
Sleeping
Sleeping
| from datetime import datetime | |
| from typing import List | |
| from app.schema.index import TransactionCreate, TransactionType | |
| def get_fake_transactions(user_id: int) -> List[TransactionCreate]: | |
| return [ | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 1), | |
| category="shopping", | |
| name_description="Amazon", | |
| amount=11.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 2), | |
| category="Streaming", | |
| name_description="Netflix", | |
| amount=4.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 3), | |
| category="Other", | |
| name_description="Consulting", | |
| amount=3.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 4), | |
| category="Other", | |
| name_description="Selling Paintings", | |
| amount=4.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 5), | |
| category="Gym", | |
| name_description="Gym membership", | |
| amount=5.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 6), | |
| category="Transportation", | |
| name_description="Uber Taxi", | |
| amount=6.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 7), | |
| category="Other", | |
| name_description="Freelancing", | |
| amount=7.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 8), | |
| category="Income", | |
| name_description="Salary", | |
| amount=8.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 9), | |
| category="Shopping", | |
| name_description="Amazon Lux", | |
| amount=9.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 10), | |
| category="Taxes", | |
| name_description="CA Property Tax", | |
| amount=10.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 1), | |
| category="shopping", | |
| name_description="Amazon", | |
| amount=11.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 2), | |
| category="Streaming", | |
| name_description="Netflix", | |
| amount=4.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 3), | |
| category="Other", | |
| name_description="Consulting", | |
| amount=3.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 4), | |
| category="Other", | |
| name_description="Selling Paintings", | |
| amount=4.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 5), | |
| category="Gym", | |
| name_description="Gym membership", | |
| amount=5.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 6), | |
| category="Transportation", | |
| name_description="Uber Taxi", | |
| amount=6.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 7), | |
| category="Other", | |
| name_description="Freelancing", | |
| amount=7.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 8), | |
| category="Income", | |
| name_description="Salary", | |
| amount=8.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 9), | |
| category="Shopping", | |
| name_description="Amazon Lux", | |
| amount=9.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 10), | |
| category="Taxes", | |
| name_description="CA Property Tax", | |
| amount=10.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 1), | |
| category="shopping", | |
| name_description="Amazon", | |
| amount=11.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 2), | |
| category="Streaming", | |
| name_description="Netflix", | |
| amount=4.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 3), | |
| category="Other", | |
| name_description="Consulting", | |
| amount=3.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 4), | |
| category="Other", | |
| name_description="Selling Paintings", | |
| amount=4.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 5), | |
| category="Gym", | |
| name_description="Gym membership", | |
| amount=5.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 6), | |
| category="Transportation", | |
| name_description="Uber Taxi", | |
| amount=6.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 7), | |
| category="Other", | |
| name_description="Freelancing", | |
| amount=7.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 8), | |
| category="Income", | |
| name_description="Salary", | |
| amount=8.0, | |
| type=TransactionType.INCOME, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 9), | |
| category="Shopping", | |
| name_description="Amazon Lux", | |
| amount=9.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| TransactionCreate( | |
| user_id=user_id, | |
| transaction_date=datetime(2022, 1, 10), | |
| category="Taxes", | |
| name_description="CA Property Tax", | |
| amount=10.0, | |
| type=TransactionType.EXPENSE, | |
| ), | |
| ] |