diff --git a/enkanetwork/model/utils.py b/enkanetwork/model/utils.py new file mode 100644 index 0000000..8e0ac60 --- /dev/null +++ b/enkanetwork/model/utils.py @@ -0,0 +1,13 @@ +from pydantic import BaseModel +from typing import Any + +from ..utils import create_ui_path + +class IconAsset(BaseModel): + filename: str = "" + url: str = "" + + def __init__(__pydantic_self__, **data: Any) -> None: + super().__init__(**data) + + __pydantic_self__.url = create_ui_path(__pydantic_self__.filename)