// Package domain defines all the domain models
package domain

import (
	"time"

	"github.com/shopspring/decimal"
)

// Order represents a FIX NewOrderSingle message received from a client.
type Order struct {
	ClOrdID    string
	Symbol     string
	Side       string
	OrdType    string
	OrderQty   decimal.Decimal
	Price      decimal.Decimal
	SessionID  string
	ReceivedAt time.Time
}

// OrderStore is the port for persisting and retrieving orders.
type OrderStore interface {
	SaveOrder(order Order)
	GetOrders() []Order
	GetOrderByClOrdID(id string) (Order, bool)
}

// FIXSender is the port for sending FIX messages back to clients.
type FIXSender interface {
	SendQuote(clOrdID, quoteID, symbol, currency string, bidPx, offerPx, bidSize, offerSize decimal.Decimal) error
}
