package wallet

import "time"

type AccountDTO struct {
	UserID           uint64  `json:"user_id"`
	AvailableBalance float64 `json:"available_balance"`
	FrozenBalance    float64 `json:"frozen_balance"`
	Status           string  `json:"status"`
}

type RechargeRequest struct {
	Amount float64 `json:"amount" binding:"required"`
}

type WithdrawRequest struct {
	Amount float64 `json:"amount" binding:"required"`
}

type LedgerDTO struct {
	ID           uint64    `json:"id"`
	LedgerNo     string    `json:"ledger_no"`
	UserID       uint64    `json:"user_id"`
	OrderID      *uint64   `json:"order_id"`
	Direction    string    `json:"direction"`
	Amount       float64   `json:"amount"`
	BalanceAfter float64   `json:"balance_after"`
	BalanceType  string    `json:"balance_type"`
	BizType      string    `json:"biz_type"`
	BizNo        string    `json:"biz_no"`
	Remark       string    `json:"remark"`
	CreatedAt    time.Time `json:"created_at"`
}

type AdminLedgerQuery struct {
	UserID   uint64
	OrderID  uint64
	BizType  string
	Page     int
	PageSize int
}

type PaginatedResult struct {
	Items    interface{} `json:"items"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"page_size"`
}

type AdminLedgerDTO struct {
	ID           uint64    `json:"id"`
	LedgerNo     string    `json:"ledger_no"`
	UserID       uint64    `json:"user_id"`
	UserPhone    string    `json:"user_phone"`
	UserNickname string    `json:"user_nickname"`
	OrderID      *uint64   `json:"order_id"`
	OrderNo      string    `json:"order_no"`
	Direction    string    `json:"direction"`
	Amount       float64   `json:"amount"`
	BalanceAfter float64   `json:"balance_after"`
	BalanceType  string    `json:"balance_type"`
	BizType      string    `json:"biz_type"`
	BizNo        string    `json:"biz_no"`
	Remark       string    `json:"remark"`
	CreatedAt    time.Time `json:"created_at"`
}
