Skip to content

Commit 24271d2

Browse files
committed
adjusting for pylint
1 parent 371c4cc commit 24271d2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

margin_app/app/models/order.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Order model
3+
"""
4+
15
from sqlalchemy import VARCHAR, Numeric, ForeignKey
26
from sqlalchemy.dialects.postgresql import UUID
37
from sqlalchemy.orm import Mapped, mapped_column
@@ -12,15 +16,17 @@ class Order(BaseModel):
1216
Attributes:
1317
- user_id (UUID): The unique identifier of the user who placed the order.
1418
Acts as both a primary key and a foreign key referencing the "user" table.
15-
- price (float): The price of the order, stored with a precision of up to 10 digits and 2 decimal places.
19+
- price (float): The price of the order,
20+
stored with a precision of up to 10 digits and 2 decimal places.
1621
- token (str): The token associated with the order.
1722
- position (UUID): The identifier of the position related to the order.
1823
1924
Table:
2025
- Name: "order"
2126
"""
2227
__tablename__ = "order"
23-
user_id: Mapped[UUID] = mapped_column(UUID(as_uuid=True), ForeignKey("user.id"), primary_key=True)
28+
user_id: Mapped[UUID] = mapped_column(UUID(as_uuid=True),
29+
ForeignKey("user.id"), primary_key=True)
2430
price: Mapped[float] = mapped_column(Numeric(precision=10, scale=2))
2531
token: Mapped[str] = mapped_column(VARCHAR)
2632
position: Mapped[UUID] = mapped_column(UUID(as_uuid=True))

0 commit comments

Comments
 (0)