package dto_astrologer

// WalletTransactionResponse is one row of the astrologer wallet's transaction
// history. The list merges four sources, told apart by Source:
//
//   CONSULTATION  a billed chat / audio / video session (consultations)
//   ORDER         an astromall order the astrologer earns on (astromall_orders)
//   LEDGER        a wallet_ledger movement: withdrawals, gifts, reports,
//                 refunds, admin adjustments, settlement reversals
//
// ID is only unique within its source; TransactionID ("CON-12", "ORD-5",
// "TXN-9") is unique across the list and is what a client should key on.
type WalletTransactionResponse struct {
	ID              uint    `json:"id"`
	TransactionID   string  `json:"transactionId"`
	Source          string  `json:"source"`
	ReferenceID     uint    `json:"referenceId"`
	ReferenceNo     string  `json:"referenceNo"`
	TransactionType string  `json:"transactionType"`
	Category        string  `json:"category"`
	Title           string  `json:"title"`
	Description     string  `json:"description"`
	Amount          float64 `json:"amount"`
	CreditAmount    float64 `json:"creditAmount"`
	DebitAmount     float64 `json:"debitAmount"`
	BalanceAfter    float64 `json:"balanceAfter"`
	IsCredit        bool    `json:"isCredit"`
	Status          string  `json:"status"`
	StatusCode      string  `json:"statusCode"`
	Icon            string  `json:"icon"`

	// Consultation rows only: whether the earning has reached the wallet yet.
	SettlementStatus string `json:"settlementStatus,omitempty"`
	SettlementLabel  string `json:"settlementLabel,omitempty"`
	CustomerName     string `json:"customerName,omitempty"`
	DurationMinutes  int    `json:"durationMinutes,omitempty"`

	TransactionDate     string `json:"transactionDate"`
	TransactionTime     string `json:"transactionTime"`
	TransactionDateTime string `json:"transactionDateTime"`
	CreatedAt           string `json:"createdAt"`
	Remarks             string `json:"remarks,omitempty"`
}
