Code source de artifacts.models.events

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel

from .enums import MapLayer


[docs] class EventContentSchema(BaseModel): type: str code: str
[docs] class EventMapSchema(BaseModel): map_id: int x: int y: int layer: MapLayer skin: Optional[str] = None
[docs] class EventSchema(BaseModel): name: str code: str content: EventContentSchema maps: list[EventMapSchema] duration: int rate: int
[docs] class ActiveEventSchema(BaseModel): name: str code: str map: EventMapSchema previous_map: Optional[EventMapSchema] = None duration: int expiration: str created_at: str