from pydantic import BaseModel
from typing import List
from decimal import Decimal
from datetime import date


class JournalLine(BaseModel):
    account_id: int
    debit: Decimal = Decimal("0")
    credit: Decimal = Decimal("0")


class JournalEntryRequest(BaseModel):
    entry_date: date
    description: str
    lines: List[JournalLine]
