feat(customer): list the customer's outlets
Adds GET /customer/outlets for the customer app: the active outlets of the customer's organization, where their EnakPoint and EnakCoin can be used, sorted by name. Each carries its name and address, and from the outlet's loyalty settings whether the cashier accepts EnakPoint and whether orders there earn EnakPoint or EnakCoin. Nothing internal (printer settings, tax rate) is exposed. The outlets list under /outlets needs a staff token, so the app had no way to show where the wallet works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8bf2fe5585
commit
c1ec6a3dfd
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
// CustomerOutlet is one outlet in GET /customer/outlets: where the customer can shop,
|
||||
// and what the outlet does with EnakPoint and EnakCoin.
|
||||
type CustomerOutlet struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Address *string `json:"address"`
|
||||
// The cashier accepts EnakPoint as payment here.
|
||||
AcceptsPointPayment bool `json:"accepts_point_payment"`
|
||||
// Orders here earn EnakPoint / EnakCoin.
|
||||
EarnsPoints bool `json:"earns_points"`
|
||||
EarnsCoins bool `json:"earns_coins"`
|
||||
}
|
||||
Reference in New Issue
Block a user