2024-01-19 03:15:48 +03:00
|
|
|
from decimal import Decimal
|
2024-01-20 03:29:15 +03:00
|
|
|
from typing import List, Optional
|
|
|
|
from uuid import UUID
|
2024-01-19 03:15:48 +03:00
|
|
|
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
class MenuBase(BaseModel):
|
|
|
|
title: str
|
2024-01-20 03:29:15 +03:00
|
|
|
description: Optional[str]
|
|
|
|
|
2024-01-19 03:15:48 +03:00
|
|
|
class Config:
|
2024-01-20 03:29:15 +03:00
|
|
|
from_attributes = True
|
2024-01-19 03:15:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
class Menu(MenuBase):
|
2024-01-20 03:29:15 +03:00
|
|
|
id: UUID
|
|
|
|
title: str
|
|
|
|
description: Optional[str]
|
|
|
|
# submenus: Optional[List[SubMenu]]
|
2024-01-19 03:15:48 +03:00
|
|
|
|
|
|
|
class Config:
|
2024-01-20 03:29:15 +03:00
|
|
|
from_attributes = True
|
2024-01-21 06:25:32 +03:00
|
|
|
|
|
|
|
|
|
|
|
class SubmenuBase(MenuBase):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|