Return role IDs on users and related names on loan APIs.

Loan orders, paid-off letters, and repayments now include user, branch, type, and document names alongside foreign-key IDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 11:58:15 +05:00
parent 2853bed2ec
commit d7cdd53597
10 changed files with 659 additions and 268 deletions

View File

@@ -60,7 +60,7 @@ func (h *handler) RegisterPublic(engine *gin.Engine) {
// list godoc
// @Summary List users
// @Description Returns paginated users with role user, with optional filters
// @Description Returns paginated users with role user, including roleId
// @Tags user
// @Produce json
// @Security BearerAuth
@@ -91,7 +91,7 @@ func (h *handler) list(c *gin.Context) {
// listClients godoc
// @Summary List client users
// @Description Returns paginated client users (role user, not assigned to any branch)
// @Description Returns paginated client users (role user, not assigned to any branch), including roleId
// @Tags user
// @Produce json
// @Security BearerAuth
@@ -122,7 +122,7 @@ func (h *handler) listClients(c *gin.Context) {
// listStaff godoc
// @Summary List staff users
// @Description Returns paginated users assigned to branches (from branch_user), including each user's branches.
// @Description Returns paginated users assigned to branches (from branch_user), including each user's branches and roleId.
// @Tags user
// @Produce json
// @Security BearerAuth
@@ -153,7 +153,7 @@ func (h *handler) listStaff(c *gin.Context) {
// getByID godoc
// @Summary Get user by ID
// @Description Returns a single user with assigned branches
// @Description Returns a single user with assigned branches and roleId
// @Tags user
// @Produce json
// @Security BearerAuth