- InviteToken model with unique token for each invite
- POST /users/invite - create invite by email with role (admin/mecanic)
- POST /auth/accept-invite - accept invite, set password, return JWT
- GET /users - list all users in tenant
- DELETE /users/{id} - deactivate user (cannot deactivate owner)
- Alembic migration for invites table
- 25 passing tests (auth + sync + orders + pdf + portal + invoices + users)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
856 B
Python
38 lines
856 B
Python
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
|
|
from app.db.models.invite import InviteToken
|
|
|
|
__all__ = [
|
|
"Tenant",
|
|
"User",
|
|
"Vehicle",
|
|
"Order",
|
|
"OrderLine",
|
|
"CatalogMarca",
|
|
"CatalogModel",
|
|
"CatalogAnsamblu",
|
|
"CatalogNorma",
|
|
"CatalogPret",
|
|
"CatalogTipDeviz",
|
|
"CatalogTipMotor",
|
|
"Invoice",
|
|
"Appointment",
|
|
"Mecanic",
|
|
"InviteToken",
|
|
]
|