import { PageQueryParam, PageResult } from "../base";

/**
 * 交易明细请求参数
 */
export interface TradeQueryParam extends PageQueryParam {
    type?: string;
    memberId?: string | number;
    minMoney?: string;
    maxMoney?: string;
    minFee?: string;
    maxFee?: string;
    startTime?: string;
    endTime?: string;
    account?: string;
    property?: string | null;
    direction?: string | null;
}

/**
 * 交易明细分页项类型
 */
export type TradePageResult = PageResult<TradeItem[]>;

/**
 * 交易明细列表分页列表项
 */
export interface TradeItem {
    id: number;
    memberId: number;
    type: number;
    amount: number;
    symbol: string;
    fee: number;
    createTime: string;
}

/**
 * 提币审核请求参数
 */
export interface WithDrawalsQueryParam extends PageQueryParam {
    account?: string;
    mobilePhone?: string;
    memberId?: string;
    address?: string;
    unit?: string;
    orderSn?: string;
    isAuto?: string;
    status?: string;
    property?: string | null;
    direction?: string | null;
}

/**
 * 提币审核分页项类型
 */
export type WithDrawalsPageResult = PageResult<WithDrawalsItem[]>;

/**
 * 提币审核列表分页列表项
 */
export interface WithDrawalsItem {
    id: number;
    memberId: number;
    coin: string;
    unit: string;
    address: string;
    remark: string;
    totalAmount: number;
    arrivedAmount: number;
    status: number;
    isAuto: number;
    fee: number;
    transactionNumber: string;
    email: string;
    phone: string;
    memberUsername: string;
    memberRealName: string;
    dealTime: string | null;
    createTime: string;
}

/**
 * 多选ids值
 */
export interface IdsParam {
    ids: IdParam[];
}

/**
 * id值
 */
export interface IdParam {
    id: number | string;
}

/**
 * 一键放币提交参数
 */
export interface PassCoinParam {
    ids: any;
    transactionNum: string;
    password: string;
}

/**
 * 交易记录详情
 */
export interface TradeDetail {
    id: number;
    memberId: number;
    address: string;
    admin: string | null;
    totalAmount: number;
    canAutoWithdraw: number;
    coin: Coin;
    fee: number;
    arrivedAmount: number;
    status: number;
    isAuto: number;
    transactionNumber: string;
    remark: string;
    dealTime: string | null;
    createTime: string;
}

export interface Coin {
    name: string;
    nameCn: string;
    unit: string;
}

/**
 * 一键放币 单个投币 提交参数
 */
export interface PassCoinByOneParam {
    id: number | string;
    transactionNumber: string;
}

/**
 * 查询充币记录参数
 */
export interface ChargeCoinParam extends PageQueryParam {
    address?: string;
    unit?: string;
    property?: string;
    direction?: string;
    account?: string;
}

/**
 * 充币记录分页项类型
 */
export type ChargeCoinPageResult = PageResult<ChargeCoinItem[]>;

/**
 * 充币记录项
 */
export interface ChargeCoinItem {
    id: number;
    username: string;
    unit: string;
    address: string;
    amount: number | null;
    walletBalance: number | null;
    createTime: string;
}
