feat(aurora): added a to_json method to the moderation model
This commit is contained in:
parent
ca1722fee3
commit
58303b8e9c
1 changed files with 4 additions and 0 deletions
|
@ -68,3 +68,7 @@ class Moderation(BaseModel):
|
||||||
return cls(**case)
|
return cls(**case)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def to_json(self, indent: int = None, file: bool = False):
|
||||||
|
from aurora.utilities.utils import dump, dumps
|
||||||
|
return dump(self.model_dump(), indent=indent) if file else dumps(self.model_dump(), indent=indent)
|
||||||
|
|
Loading…
Reference in a new issue