adding static connection
This commit is contained in:
1 parent
eba7896893
commit
422e217180
14 files changed
+405
-2
No files matched your search
@@ -9,6 +9,7 @@ from app.models.manufacturer import Manufacturer
|
||||
from app.models.part_type import PartType
|
||||
from app.models.permission import Permission
|
||||
from app.models.scope_model import ScopeModel
|
||||
from app.models.static_connection import StaticConnection
|
||||
from app.models.sub_part_type import SubPartType
|
||||
from app.models.refresh_token import RefreshToken
|
||||
from app.models.role import Role
|
||||
@@ -24,6 +25,7 @@ __all__ = [
|
||||
"PartType",
|
||||
"Permission",
|
||||
"ScopeModel",
|
||||
"StaticConnection",
|
||||
"SubPartType",
|
||||
"RefreshToken",
|
||||
"Role",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
from sqlalchemy import Float, UniqueConstraint
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class StaticConnection(Base):
|
||||
__tablename__ = "static_connections"
|
||||
__table_args__ = (UniqueConstraint("od_mm"),)
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
od_mm: Mapped[float] = mapped_column(Float, nullable=False)
|
||||
od_in: Mapped[float] = mapped_column(Float, nullable=False)
|
||||
Reference in new issue
Block a user