guide changes

This commit is contained in:
2026-09-01 12:01:43 +05:30
parent ae6162a632
commit 485f31239d
11 changed files with 746 additions and 5 deletions

View File

@@ -68,6 +68,21 @@ type Tenantlocations struct {
Deliverymins int `json:"deliverymins"`
Cancelsecs int `json:"cancelsecs"`
Status string `json:"status" gorm:"default:Active"`
// Who will run this outlet, when the caller already has somebody in mind.
//
// `gorm:"-"` because it is not a column — it names an existing `app_users`
// row to bind to the new branch instead of spawning a fresh login.
//
// Spawning was the only option, and it produced an account named after the
// SHOP, on the SHOP's email address, one per outlet. Two people behind the
// same counter shared one credential and nothing recorded which of them did
// anything. Naming a person here is what lets a merchant decide who runs a
// branch, and hire that person before the branch exists.
//
// Zero keeps the old behaviour exactly, so every existing caller is
// unaffected.
Operatorid int `json:"operatorid" gorm:"-"`
}
type Tenantslot struct {
@@ -120,7 +135,7 @@ type Tenantpricing struct {
}
type StaffInfo struct {
Userid int `json:"userid"`
Userid int `json:"userid"`
// What the role is called, so a console does not have to map ids itself.
// `app_roles` holds six rows for four back-office roles and most accounts
// carry an id absent from it, so any mapping written client-side is wrong.