Add IconAsset class

This commit is contained in:
M-307 2022-08-14 16:45:23 +07:00
parent 5860e2ddea
commit 9353d10ba0

View File

@ -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)