18 lines
481 B
Python
18 lines
481 B
Python
from typing import List
|
|
# from app.models.models import image
|
|
from app.schemas.image import ImageBase
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
from sqlalchemy import select
|
|
from app.models.models import Image
|
|
|
|
class ImageDao:
|
|
|
|
@classmethod
|
|
async def get_image_list(cls, db: AsyncSession, query_model: ImageBase):
|
|
|
|
stmt = (
|
|
select(Image)
|
|
)
|
|
|
|
result = await db.execute(stmt)
|
|
return result.mappings().all() |