Fixes and Changes again

This commit is contained in:
2026-02-22 17:28:27 +02:00
parent 8abb65ac8d
commit ae4b31328f
11 changed files with 1617 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
from pydantic import BaseModel, Field
from typing import List, Optional
from typing import Any, Dict, List, Optional
from enum import Enum
@@ -24,6 +24,7 @@ class MelodyInfo(BaseModel):
minSpeed: int = 0
maxSpeed: int = 0
totalNotes: int = Field(default=1, ge=1, le=16)
totalActiveBells: int = 0
steps: int = 0
color: str = ""
isTrueRing: bool = False
@@ -50,6 +51,7 @@ class MelodyCreate(BaseModel):
url: str = ""
uid: str = ""
pid: str = ""
metadata: Optional[Dict[str, Any]] = None
class MelodyUpdate(BaseModel):
@@ -59,6 +61,7 @@ class MelodyUpdate(BaseModel):
url: Optional[str] = None
uid: Optional[str] = None
pid: Optional[str] = None
metadata: Optional[Dict[str, Any]] = None
class MelodyInDB(MelodyCreate):