generic tables from dataclasses

This commit is contained in:
null
2024-03-07 22:18:27 +01:00
parent a5c01038ca
commit f9743b834c
6 changed files with 105 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
from dataclasses import dataclass
from .Strategy import Strategy
@dataclass
class Abc(Strategy):
symbol: str
entry: float
stop: float
tp: float
risk: float
@staticmethod
def get_table_name():
return "Abc"
@staticmethod
def get_route_prefix():
return "/strategies/abc"
+8
View File
@@ -0,0 +1,8 @@
from dataclasses import dataclass
@dataclass
class Strategy():
id: str
enabled: bool
fulfilled: bool
created: str
View File