mirror of
https://github.com/koloideal/DutyLog.git
synced 2026-06-10 18:35:29 +03:00
update
This commit is contained in:
@@ -20,10 +20,10 @@ class HoursTransactionsDAO:
|
||||
)
|
||||
return list(result.scalars().all())
|
||||
|
||||
async def get_by_user_id(self, user_id: int) -> list[HoursTransaction]:
|
||||
async def get_by_resident_id(self, resident_id: int) -> list[HoursTransaction]:
|
||||
result = await self.session.execute(
|
||||
select(HoursTransaction)
|
||||
.where(HoursTransaction.user_id == user_id)
|
||||
.where(HoursTransaction.resident_id == resident_id)
|
||||
.order_by(HoursTransaction.created_at.desc())
|
||||
)
|
||||
return list(result.scalars().all())
|
||||
|
||||
Reference in New Issue
Block a user