generic tables from dataclasses
This commit is contained in:
@@ -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"
|
||||
@@ -0,0 +1,8 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
@dataclass
|
||||
class Strategy():
|
||||
id: str
|
||||
enabled: bool
|
||||
fulfilled: bool
|
||||
created: str
|
||||
Reference in New Issue
Block a user