Bump go-cart-actor: scheduling cluster service + booking-hold cart/checkout seam
Deploys cmd/scheduling as a 3-replica actor cluster (shared RWX commerce-data event logs, gRPC mesh via POD_IP + actor-pool label, edge /api/scheduling pass-through, fail-closed mcpauth on admin/MCP). cart/checkout get SCHEDULING_SERVICE_URL so line removal releases holds; backoffice gets SCHEDULING_URL for the admin proxy. Platform seam: order.Line.Properties carries booking_* fields through order.created; scheduling.booking_confirmed/ cancelled event types. Compose + prep-dev-data wire the schedules dir. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
1 parent
7f73d6885b
commit
b16820bf62
5 files changed
+542
-10
No files matched your search
+15
-10
@@ -28,6 +28,12 @@ type Line struct {
|
||||
// DropShip marks items fulfilled directly by the supplier. The inventory
|
||||
// reactor must skip the stock decrement for these lines.
|
||||
DropShip bool `json:"drop_ship,omitempty"`
|
||||
// Properties carries per-line domain attributes a reactor needs that don't
|
||||
// fit the fixed fields — e.g. booking_hold_id / booking_start / booking_end
|
||||
// for the scheduling service's order.created commit reactor (wire-safe
|
||||
// addition, same precedent as Created.CheckoutID). Optional; reactors must
|
||||
// tolerate absent properties on every line.
|
||||
Properties map[string]string `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// Created is the payload of an event.OrderCreated envelope.
|
||||
@@ -40,15 +46,15 @@ type Created struct {
|
||||
OrderReference string `json:"order_reference,omitempty"`
|
||||
CartID string `json:"cart_id,omitempty"`
|
||||
// CheckoutID links the originating checkout grain (wire-safe addition).
|
||||
CheckoutID string `json:"checkout_id,omitempty"`
|
||||
Country string `json:"country"`
|
||||
Currency string `json:"currency,omitempty"`
|
||||
CustomerEmail string `json:"customer_email,omitempty"`
|
||||
CheckoutID string `json:"checkout_id,omitempty"`
|
||||
Country string `json:"country"`
|
||||
Currency string `json:"currency,omitempty"`
|
||||
CustomerEmail string `json:"customer_email,omitempty"`
|
||||
// CustomerID is the customer profile ID for identity linking (B0.4). Reactors
|
||||
// (e.g. profile service) use this to link the order to the customer profile.
|
||||
CustomerID string `json:"customer_id,omitempty"`
|
||||
Lines []Line `json:"lines"`
|
||||
PlacedAtMs int64 `json:"placed_at_ms,omitempty"`
|
||||
CustomerID string `json:"customer_id,omitempty"`
|
||||
Lines []Line `json:"lines"`
|
||||
PlacedAtMs int64 `json:"placed_at_ms,omitempty"`
|
||||
}
|
||||
|
||||
// Encode serialises the payload for event.Event.Payload.
|
||||
@@ -122,8 +128,8 @@ func DecodeInvoicePaid(raw []byte) (InvoicePaid, error) {
|
||||
// (1510 C / 304x D / 261x D per rate), idempotent per credit number.
|
||||
type InvoiceCredited struct {
|
||||
OrderID string `json:"order_id"`
|
||||
InvoiceNumber string `json:"invoice_number"` // the original invoice
|
||||
CreditNumber string `json:"credit_number"` // from the same gap-free series
|
||||
InvoiceNumber string `json:"invoice_number"` // the original invoice
|
||||
CreditNumber string `json:"credit_number"` // from the same gap-free series
|
||||
CompanyID string `json:"company_id,omitempty"`
|
||||
OcrReference string `json:"ocr_reference,omitempty"`
|
||||
AmountIncVat int64 `json:"amount_inc_vat"`
|
||||
@@ -186,4 +192,3 @@ func DecodeRefundIssued(raw []byte) (RefundIssued, error) {
|
||||
err := json.Unmarshal(raw, &r)
|
||||
return r, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user