feat: вфыв

This commit is contained in:
2024-07-20 09:32:22 +03:00
parent e7235021f9
commit 6b09251141
27 changed files with 536 additions and 119 deletions

14
services/role.py Normal file
View File

@@ -0,0 +1,14 @@
from sqlalchemy import select
from models import Role
from schemas.role import *
from services.base import BaseService
class RoleService(BaseService):
async def get_all(self) -> GetAllRolesResponse:
stmt = (select(Role).order_by(Role.key))
roles = (await self.session.scalars(stmt)).all()
return GetAllRolesResponse(
roles=RoleSchema.from_orm_list(roles)
)