
- Implemented complete authentication system with JWT tokens - Created user management with registration and profile endpoints - Built client management with full CRUD operations - Developed invoice system with line items and automatic calculations - Set up SQLite database with proper migrations using Alembic - Added health monitoring and API documentation - Configured CORS for cross-origin requests - Included comprehensive README with usage examples
25 lines
579 B
Python
25 lines
579 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class InvoiceItemBase(BaseModel):
|
|
description: str
|
|
quantity: float = 1.0
|
|
unit_price: float
|
|
notes: Optional[str] = None
|
|
|
|
class InvoiceItemCreate(InvoiceItemBase):
|
|
pass
|
|
|
|
class InvoiceItemUpdate(BaseModel):
|
|
description: Optional[str] = None
|
|
quantity: Optional[float] = None
|
|
unit_price: Optional[float] = None
|
|
notes: Optional[str] = None
|
|
|
|
class InvoiceItemResponse(InvoiceItemBase):
|
|
id: int
|
|
invoice_id: int
|
|
total_price: float
|
|
|
|
class Config:
|
|
from_attributes = True |