add exchange table
All checks were successful
Backend CI / unit-test (push) Successful in 35s

This commit is contained in:
2025-09-22 14:33:32 +02:00
parent 76cc967c42
commit 1fbc93353d
17 changed files with 446 additions and 92 deletions

View File

@@ -14,8 +14,43 @@ class TradeBase(SQLModel):
user_id: int
friendly_name: str | None
symbol: str
exchange: str
underlying_currency: UnderlyingCurrency
trade_type: TradeType
trade_strategy: TradeStrategy
trade_date: date
trade_time_utc: datetime
quantity: int
price_cents: int
gross_cash_flow_cents: int
commission_cents: int
net_cash_flow_cents: int
notes: str | None
cycle_id: int | None = None
class TradeCreate(TradeBase):
expiry_date: date | None = None
strike_price_cents: int | None = None
is_invalidated: bool = False
invalidated_at: datetime | None = None
replaced_by_trade_id: int | None = None
class TradeRead(TradeBase):
id: int
is_invalidated: bool
invalidated_at: datetime | None
class UserBase(SQLModel):
username: str
is_active: bool = True
class UserCreate(UserBase):
password: str
class UserRead(UserBase):
id: int