feat/things-munaja: adjust prescription

This commit is contained in:
2025-11-17 07:57:22 +07:00
parent c19965f4c3
commit 03210549bb
7 changed files with 51 additions and 33 deletions
@@ -47,13 +47,13 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Pr
tx = dg.I
}
tx = tx.
tx = tx.Debug().
Model(&e.PrescriptionItem{}).
Scopes(gh.Preload(input.Includes)).
Scopes(gh.Filter(input.FilterDto)).
Count(&count).
Scopes(gh.Paginate(input, &pagination)).
Order("\"CreatedAt\" DESC")
Scopes(gh.Sort(input.Sort))
if err := tx.Find(&data).Error; err != nil {
if err == gorm.ErrRecordNotFound {