feat: stabilize KYC, international assets and multi-currency schema
- Split mother's name in KYC (last/first) - Added mileage_unit and fuel_type to Assets - Expanded AssetCost for international VAT and original currency - Fixed SQLAlchemy IndexError in asset catalog lookup - Added exchange_rate and ratings tables to models
This commit is contained in:
BIN
backend/app/db/__pycache__/base.cpython-312.pyc
Executable file → Normal file
BIN
backend/app/db/__pycache__/base.cpython-312.pyc
Executable file → Normal file
Binary file not shown.
BIN
backend/app/db/__pycache__/base_class.cpython-312.pyc
Normal file
BIN
backend/app/db/__pycache__/base_class.cpython-312.pyc
Normal file
Binary file not shown.
@@ -1,10 +1,6 @@
|
||||
from sqlalchemy.ext.asyncio import AsyncAttrs
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
|
||||
class Base(AsyncAttrs, DeclarativeBase):
|
||||
"""
|
||||
Base class for all SQLAlchemy models.
|
||||
Includes AsyncAttrs to support async attribute access (lazy loading).
|
||||
"""
|
||||
pass
|
||||
from app.db.base_class import Base # noqa
|
||||
from app.models.address import Address, GeoPostalCode, GeoStreet, GeoStreetType # noqa
|
||||
from app.models.identity import User, Person, VerificationToken, Wallet # noqa
|
||||
from app.models.organization import Organization, OrganizationMember # noqa
|
||||
from app.models.asset import Asset, AssetCatalog, AssetCost, AssetEvent # noqa
|
||||
from app.models.gamification import UserStats, PointsLedger # noqa
|
||||
13
backend/app/db/base_class.py
Normal file
13
backend/app/db/base_class.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import Any
|
||||
from sqlalchemy.ext.declarative import as_declarative, declared_attr
|
||||
|
||||
@as_declarative()
|
||||
class Base:
|
||||
id: Any
|
||||
__name__: str
|
||||
|
||||
# Automatikusan generálja a tábla nevét az osztálynévből,
|
||||
# ha nincs külön megadva (bár mi megadjuk a sémát)
|
||||
@declared_attr
|
||||
def __tablename__(cls) -> str:
|
||||
return cls.__name__.lower()
|
||||
Reference in New Issue
Block a user