complete updating the endpoints and models

This commit is contained in:
Georges-Antoine Assi
2024-12-20 22:41:56 -05:00
parent 0850c0cbcf
commit 3fcce6606c
26 changed files with 332 additions and 201 deletions

View File

@@ -145,6 +145,10 @@ class Rom(BaseModel):
def multi(self) -> bool:
return len(self.files) > 1
@cached_property
def file_size_bytes(self) -> int:
return sum(f.file_size_bytes for f in self.files)
def get_collections(self) -> list[Collection]:
from handler.database import db_rom_handler