|
|
@ -188,6 +188,16 @@ class Group(BaseModel):
|
|
|
|
def __repl__(self) -> str:
|
|
|
|
def __repl__(self) -> str:
|
|
|
|
return f"{self.label}"
|
|
|
|
return f"{self.label}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def show_format(self) -> str:
|
|
|
|
|
|
|
|
output = f"[b]label:[/] {self.label}\n" \
|
|
|
|
|
|
|
|
f"[b]sources:[/] \n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for source in self.sources:
|
|
|
|
|
|
|
|
prefix = '\t'
|
|
|
|
|
|
|
|
output+=f"{source.source.show_format(prefix)}\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return output
|
|
|
|
|
|
|
|
|
|
|
|
class GroupSource(BaseModel):
|
|
|
|
class GroupSource(BaseModel):
|
|
|
|
group = ForeignKeyField(Group, backref='sources')
|
|
|
|
group = ForeignKeyField(Group, backref='sources')
|
|
|
|
source = ForeignKeyField(Source)
|
|
|
|
source = ForeignKeyField(Source)
|
|
|
|