Add branch_user table and branch-user assignment endpoints

Introduces a branch_user join table linking branches to users, plus
create/delete API endpoints under the auth module for managing branch
assignments. The create response includes the branch's localized name
via a join. Regenerated swagger docs to include the new endpoints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 15:02:05 +05:00
parent 1337175e5d
commit 77bc4025d3
9 changed files with 462 additions and 3 deletions

View File

@@ -23,3 +23,23 @@ type UserCredentials struct {
Id int
Password string
}
type LocalizedText struct {
En string `json:"en"`
Ru string `json:"ru"`
Tm string `json:"tm"`
}
type BranchUserDTO struct {
Id int64 `json:"id"`
BranchId int64 `json:"branchId"`
BranchName LocalizedText `json:"branchName"`
UserId int64 `json:"userId"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type CreateBranchUserDTO struct {
BranchId int64 `json:"branchId" binding:"required"`
UserId int64 `json:"userId" binding:"required"`
}