
Features: - JWT authentication with user registration and login - Customer management with full CRUD operations - Invoice management with automatic calculations - Multi-tenant data isolation by user - SQLite database with Alembic migrations - RESTful API with comprehensive documentation - Tax calculations and invoice status tracking - Code formatted with Ruff linting
13 lines
406 B
Python
13 lines
406 B
Python
from sqlalchemy.orm import relationship
|
|
from .user import User
|
|
from .customer import Customer as Customer
|
|
from .invoice import (
|
|
Invoice as Invoice,
|
|
InvoiceItem as InvoiceItem,
|
|
InvoiceStatus as InvoiceStatus,
|
|
)
|
|
|
|
# Update relationships after all models are imported
|
|
User.customers = relationship("Customer", back_populates="owner")
|
|
User.invoices = relationship("Invoice", back_populates="user")
|