15 lines
317 B
Python
15 lines
317 B
Python
|
|
from typing import TypeVar, Union
|
||
|
|
|
||
|
|
from sqlalchemy import Column
|
||
|
|
from sqlalchemy.orm import RelationshipProperty
|
||
|
|
|
||
|
|
__all__ = [
|
||
|
|
'Col',
|
||
|
|
'Rel',
|
||
|
|
]
|
||
|
|
|
||
|
|
# Define type aliases for SQLAlchemy columns and relationships in declarative models
|
||
|
|
_T = TypeVar('_T')
|
||
|
|
Col = Union[Column, _T]
|
||
|
|
Rel = Union[RelationshipProperty, _T]
|