|
|
@ -109,6 +109,18 @@ class Source(BaseModel):
|
|
|
|
|
|
|
|
|
|
|
|
def __repr__(self) -> str:
|
|
|
|
def __repr__(self) -> str:
|
|
|
|
return f"{self.label}"
|
|
|
|
return f"{self.label}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def show_format(self) -> str:
|
|
|
|
|
|
|
|
output = f"[b]label:[/] {self.label}\n" \
|
|
|
|
|
|
|
|
f"[b]source:[/] {self.source.path}\n" \
|
|
|
|
|
|
|
|
f"[b]args:[/] {self.args}\n" \
|
|
|
|
|
|
|
|
f"[b]destionations:[/] \n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for destination in self.destinations:
|
|
|
|
|
|
|
|
output+=f"\t{destination.path}\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
|
|
class Destination(BaseModel):
|
|
|
|
class Destination(BaseModel):
|
|
|
|
source = ForeignKeyField(Source, backref='destinations')
|
|
|
|
source = ForeignKeyField(Source, backref='destinations')
|
|
|
|
path = ForeignKeyField(Path)
|
|
|
|
path = ForeignKeyField(Path)
|
|
|
|