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>
17 lines
554 B
Go
17 lines
554 B
Go
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"`
|
|
}
|