delivery slot updated in orders and deliveries

This commit is contained in:
2026-10-06 19:37:08 +05:30
parent 03ae7d310b
commit a30763d323
5 changed files with 274 additions and 6 deletions

View File

@@ -255,8 +255,17 @@ type Orders struct {
// Distinct from `Deliverytime` above, which is a TIMESTAMP of what happened
// and is defaulted to now() a few lines into CreateOrderv3. These two say
// what was asked for; that one says what occurred.
Deliveryslotid int `json:"deliveryslotid" gorm:"column:deliveryslotid"`
Deliveryslotdate string `json:"deliveryslotdate" gorm:"column:deliveryslotdate"`
Deliveryslotid int `json:"deliveryslotid" gorm:"column:deliveryslotid"`
Deliveryslotdate string `json:"deliveryslotdate" gorm:"column:deliveryslotdate"`
// Joined from deliveryslots, not stored on the order.
//
// So a shop that renames "Evening" to "After work" sees the new name on
// orders already placed — the window they chose has not changed, only what
// it is called. Read-only: nothing writes these back.
Slotkey string `json:"slotkey" gorm:"->"`
Deliveryslotname string `json:"deliveryslotname" gorm:"->"`
Deliveryslotstart string `json:"deliveryslotstart" gorm:"->"`
Deliveryslotend string `json:"deliveryslotend" gorm:"->"`
Orderstatus string `json:"orderstatus"`
Pending string `json:"pending"`
Processing string `json:"processing"`