Spaces:
Sleeping
Sleeping
File size: 2,874 Bytes
4761dd9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
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="category1",
name_description="name_description",
amount=1.0,
type=TransactionType.EXPENSE,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 2),
category="category2",
name_description="name_description",
amount=2.0,
type=TransactionType.EXPENSE,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 3),
category="category3",
name_description="name_description",
amount=3.0,
type=TransactionType.INCOME,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 4),
category="category1",
name_description="name_description",
amount=4.0,
type=TransactionType.INCOME,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 5),
category="category2",
name_description="name_description",
amount=5.0,
type=TransactionType.EXPENSE,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 6),
category="category3",
name_description="name_description",
amount=6.0,
type=TransactionType.EXPENSE,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 7),
category="category1",
name_description="name_description",
amount=7.0,
type=TransactionType.INCOME,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 8),
category="category2",
name_description="name_description",
amount=8.0,
type=TransactionType.INCOME,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 9),
category="category3",
name_description="name_description",
amount=9.0,
type=TransactionType.EXPENSE,
),
TransactionCreate(
user_id=user_id,
transaction_date=datetime(2022, 1, 10),
category="category1",
name_description="name_description",
amount=10.0,
type=TransactionType.EXPENSE,
),
] |