feat(backend): sync endpoints + all models + seed + order workflow
- All business models: Vehicle, Order, OrderLine, Invoice, Appointment, CatalogMarca/Model/Ansamblu/Norma/Pret/TipDeviz/TipMotor, Mecanic - Sync endpoints: GET /sync/full, GET /sync/changes?since=, POST /sync/push with tenant isolation and last-write-wins conflict resolution - Order CRUD with state machine: DRAFT -> VALIDAT -> FACTURAT Auto-recalculates totals (manopera + materiale) - Vehicle CRUD: list, create, get, update - Seed data: 24 marci, 11 ansamble, 6 tipuri deviz, 5 tipuri motoare, 3 preturi - Alembic migration for all business models - 13 passing tests (auth + sync + orders) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,35 @@
|
||||
from app.db.models.tenant import Tenant
|
||||
from app.db.models.user import User
|
||||
from app.db.models.vehicle import Vehicle
|
||||
from app.db.models.order import Order
|
||||
from app.db.models.order_line import OrderLine
|
||||
from app.db.models.catalog import (
|
||||
CatalogMarca,
|
||||
CatalogModel,
|
||||
CatalogAnsamblu,
|
||||
CatalogNorma,
|
||||
CatalogPret,
|
||||
CatalogTipDeviz,
|
||||
CatalogTipMotor,
|
||||
)
|
||||
from app.db.models.invoice import Invoice
|
||||
from app.db.models.appointment import Appointment
|
||||
from app.db.models.mecanic import Mecanic
|
||||
|
||||
__all__ = ["Tenant", "User"]
|
||||
__all__ = [
|
||||
"Tenant",
|
||||
"User",
|
||||
"Vehicle",
|
||||
"Order",
|
||||
"OrderLine",
|
||||
"CatalogMarca",
|
||||
"CatalogModel",
|
||||
"CatalogAnsamblu",
|
||||
"CatalogNorma",
|
||||
"CatalogPret",
|
||||
"CatalogTipDeviz",
|
||||
"CatalogTipMotor",
|
||||
"Invoice",
|
||||
"Appointment",
|
||||
"Mecanic",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user