package coinledger

type coinLedgerUserDTO struct {
	UserID        string `json:"userId"`
	DisplayUserID string `json:"displayUserId"`
	Username      string `json:"username"`
	Avatar        string `json:"avatar"`
}

type CSVExport struct {
	FileName string
	Content  []byte
	Count    int
}

type coinLedgerEntryDTO struct {
	EntryID            int64             `json:"entryId"`
	TransactionID      string            `json:"transactionId"`
	CommandID          string            `json:"commandId"`
	ExternalRef        string            `json:"externalRef"`
	UserID             string            `json:"userId"`
	User               coinLedgerUserDTO `json:"user"`
	BizType            string            `json:"bizType"`
	Direction          string            `json:"direction"`
	Amount             int64             `json:"amount"`
	AvailableDelta     int64             `json:"availableDelta"`
	AvailableAfter     int64             `json:"availableAfter"`
	CounterpartyUserID string            `json:"counterpartyUserId"`
	RoomID             string            `json:"roomId"`
	Metadata           map[string]any    `json:"metadata"`
	CreatedAtMS        int64             `json:"createdAtMs"`
}

type coinSellerLedgerDTO struct {
	EntryID            int64                     `json:"entryId"`
	TransactionID      string                    `json:"transactionId"`
	CommandID          string                    `json:"commandId"`
	LedgerType         string                    `json:"ledgerType"`
	BizType            string                    `json:"bizType"`
	Seller             coinLedgerUserDTO         `json:"seller"`
	Receiver           coinLedgerUserDTO         `json:"receiver"`
	Amount             int64                     `json:"amount"`
	Direction          string                    `json:"direction"`
	AvailableDelta     int64                     `json:"availableDelta"`
	SellerBalanceAfter int64                     `json:"sellerBalanceAfter"`
	StockType          string                    `json:"stockType,omitempty"`
	PaidCurrencyCode   string                    `json:"paidCurrencyCode,omitempty"`
	PaidAmountMicro    int64                     `json:"paidAmountMicro,omitempty"`
	TransferUSDMinor   int64                     `json:"transferUsdMinor,omitempty"`
	Reason             string                    `json:"reason,omitempty"`
	CounterpartyUserID string                    `json:"counterpartyUserId"`
	OperatorUserID     string                    `json:"operatorUserId"`
	Operator           coinAdjustmentOperatorDTO `json:"operator"`
	Metadata           map[string]any            `json:"metadata"`
	CreatedAtMS        int64                     `json:"createdAtMs"`
}

type coinAdjustmentOperatorDTO struct {
	AdminID  string `json:"adminId"`
	Username string `json:"username"`
	Name     string `json:"name"`
}

type coinAdjustmentDTO struct {
	EntryID        int64                     `json:"entryId"`
	TransactionID  string                    `json:"transactionId"`
	CommandID      string                    `json:"commandId"`
	UserID         string                    `json:"userId"`
	User           coinLedgerUserDTO         `json:"user"`
	Direction      string                    `json:"direction"`
	Amount         int64                     `json:"amount"`
	AvailableDelta int64                     `json:"availableDelta"`
	AvailableAfter int64                     `json:"availableAfter"`
	Reason         string                    `json:"reason"`
	Remark         string                    `json:"remark"`
	OperatorUserID string                    `json:"operatorUserId"`
	Operator       coinAdjustmentOperatorDTO `json:"operator"`
	CreatedAtMS    int64                     `json:"createdAtMs"`
}

type coinAdjustmentCreateDTO struct {
	TransactionID  string            `json:"transactionId"`
	BalanceAfter   int64             `json:"balanceAfter"`
	User           coinLedgerUserDTO `json:"user"`
	Amount         int64             `json:"amount"`
	AvailableDelta int64             `json:"availableDelta"`
	Reason         string            `json:"reason"`
	Remark         string            `json:"remark"`
}
