2026-05-15 10:00:43 +08:00

58 lines
2.4 KiB
Go

package coinledger
type coinLedgerUserDTO struct {
UserID string `json:"userId"`
DisplayUserID string `json:"displayUserId"`
Username string `json:"username"`
Avatar string `json:"avatar"`
}
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 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"`
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"`
}