status updated
This commit is contained in:
@@ -31,8 +31,8 @@ type Tenantinfo struct {
|
||||
// result set and thrown away for want of a field to scan into. A shop
|
||||
// profile that cannot say how long the business has been on the platform is
|
||||
// missing a fact the database has held all along.
|
||||
Created time.Time `json:"created"`
|
||||
Tenantinfo string `json:"tenantinfo"`
|
||||
Created time.Time `json:"created"`
|
||||
Tenantinfo string `json:"tenantinfo"`
|
||||
// The FSSAI or trade licence.
|
||||
//
|
||||
// The column has always existed and `GetCustomerTenants` already selects it
|
||||
@@ -63,14 +63,14 @@ type Tenantinfo struct {
|
||||
// `b.categoryname`, and the struct had nowhere to put it — so the value was
|
||||
// computed on every read and discarded, leaving the console to print
|
||||
// "Category 2" at a merchant who trades under Daily Needs.
|
||||
Categoryname string `json:"categoryname"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Accountname string `json:"Accountname"`
|
||||
Status string `json:"status"`
|
||||
Allocationid int `json:"allocationid"`
|
||||
Allocationtype string `json:"allocationtype"`
|
||||
Allocationmode int `json:"allocationmode"`
|
||||
Categoryname string `json:"categoryname"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Accountname string `json:"Accountname"`
|
||||
Status string `json:"status"`
|
||||
Allocationid int `json:"allocationid"`
|
||||
Allocationtype string `json:"allocationtype"`
|
||||
Allocationmode int `json:"allocationmode"`
|
||||
|
||||
// How many outlets this merchant has.
|
||||
//
|
||||
@@ -105,6 +105,35 @@ type Tenantlocations struct {
|
||||
Cancelsecs int `json:"cancelsecs"`
|
||||
Status string `json:"status" gorm:"default:Active"`
|
||||
|
||||
/*
|
||||
Is this branch trading today?
|
||||
|
||||
SEPARATE FROM `Status`, deliberately. Status is the platform's word for
|
||||
whether a branch exists at all — setting it to Inactive is how a branch is
|
||||
decommissioned, and the staff console reads it that way. A shopkeeper
|
||||
closing for an afternoon because the power went out is saying something
|
||||
completely different, and the two must not share a field: a day off would
|
||||
read to Nearle as a shop that had shut down.
|
||||
|
||||
Default true. Every branch trading today keeps trading.
|
||||
*/
|
||||
Isopen bool `json:"isopen" gorm:"column:isopen;default:true"`
|
||||
|
||||
/*
|
||||
The date it opens again, when the shop knows it.
|
||||
|
||||
"Closed until the 12th" means closed on the 11th and OPEN on the 12th —
|
||||
the date names the first day back, which is how the phrase reads.
|
||||
|
||||
Nothing flips `Isopen` back on a timer. The answer is worked out on read
|
||||
(see StoreIsOpen), so a branch that said "back on Monday" is open on
|
||||
Monday whether or not anybody remembered. A job would drift; this cannot.
|
||||
|
||||
Empty means closed until somebody says otherwise, which is the right
|
||||
default for a power cut nobody can put an end date on.
|
||||
*/
|
||||
Closeduntil string `json:"closeduntil" gorm:"column:closeduntil"`
|
||||
|
||||
// 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`
|
||||
|
||||
Reference in New Issue
Block a user