status updated
This commit is contained in:
@@ -467,6 +467,31 @@ type TenantInfo struct {
|
||||
Categoryid int `json:"categoryid"`
|
||||
Registrationno string `json:"registrationno"`
|
||||
Orderscount int `json:"orderscount"`
|
||||
|
||||
/*
|
||||
Whether this branch is taking orders, and why not when it is not.
|
||||
|
||||
`Isopen` and `Closeduntil` are the stored columns; `Isaccepting` and
|
||||
`Closedreason` are worked out per request by models.StoreIsOpen, which
|
||||
also folds in `status` and lets a dated close expire on its own.
|
||||
|
||||
THE APP SHOULD READ `isaccepting`, not `isopen`. The raw flag says what
|
||||
the shopkeeper last pressed; the computed one is the answer — a branch
|
||||
that said "back on Monday" has isopen false on Monday and is open.
|
||||
|
||||
The branch is still RETURNED when closed rather than filtered out. A shop
|
||||
that vanishes reads to a regular customer as gone for good; one marked
|
||||
"closed today" brings them back tomorrow. An app that would rather hide
|
||||
it can, from this field.
|
||||
*/
|
||||
// The BRANCH status, aliased in the query so it does not collide with the
|
||||
// tenant status already on this struct. Feeds StoreIsOpen.
|
||||
Locationstatus string `json:"-" gorm:"column:locationstatus"`
|
||||
Isopen bool `json:"isopen"`
|
||||
Closeduntil string `json:"closeduntil"`
|
||||
Isaccepting bool `json:"isaccepting" gorm:"-"`
|
||||
Closedreason string `json:"closedreason" gorm:"-"`
|
||||
|
||||
// Products []Products `json:"products" gorm:"-"`
|
||||
ProductSubcategory []ProductSubcategory `json:"productsubcategory" gorm:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user