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

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

/**
 * 币种查询参数类型声明
 */
export interface CoinQueryParam extends PageQueryParam {
  property?: string | null;
  direction?: string | null;
}

/**
 * 币种分页项类型
 */
export type CoinPageResult = PageResult<CoinItem[]>;

/**
 * 币种列表项声明
 */
export interface CoinItem {
  id: number;
  name: string;
  nameCn: string;
  unit: string;
  accountType: number;
  allBalance: number | null;
  blockHeight: number | null;
  canAutoWithdraw: number;
  canRecharge: number;
  canTransfer: number;
  canWithdraw: number;
  cnyRate: number;
  usdRate: number;
  coldWalletAddress: string;
  depositAddress: string;
  enableRpc: number;
  hasLegal: boolean;
  hotAllBalance: number | null;
  infolink: string;
  information: string;
  isPlatformCoin: number;
  maxTxFee: number;
  maxWithdrawAmount: number;
  minRechargeAmount: number;
  minTxFee: number;
  minWithdrawAmount: number;
  minerFee: number | null;
  sort: number;
  status: number;
  withdrawFeeType: number;
  withdrawFeeValue: number;
  withdrawScale: number;
  withdrawThreshold: number | null;
  parentCoinName?: string;
}

/**
 * 更新币种表单类型声明
 */
export interface FormData {
  name: string;
  nameCn: string;
  unit: string;
  accountType: number;
  allBalance: number | null;
  blockHeight: number | null;
  canAutoWithdraw: number;
  canRecharge: number;
  canTransfer: number;
  canWithdraw: number;
  cnyRate: number;
  usdRate: number;
  code: string;
  coldWalletAddress: string;
  depositAddress: string;
  enableRpc: number;
  hasLegal: boolean;
  hotAllBalance: number | null;
  infolink: string;
  information: string;
  isPlatformCoin: number;
  maxTxFee: number;
  maxWithdrawAmount: number;
  minRechargeAmount: number;
  minTxFee: number;
  minWithdrawAmount: number;
  minerFee: number | null;
  sort: number;
  status: number;
  withdrawFeeType: number;
  withdrawFeeValue: number;
  withdrawScale: number;
  withdrawThreshold: number | null;
  parentCoinName?: string;
}

/**
 * 币种扩展信息表单
 */
export interface CoinExtFormData {
  extNameCn?: string;
  extNameEn?: string;
  extIcon?: string;
  extRank?: number | null;
  extMarketCap?: string;
  extCirculatingSupply?: string;
  extIssuePrice?: number | null;
  extAthPrice?: number | null;
  extAthDate?: string;
  extWhitepaper?: string;
}

/**
 * 转入冷钱包
 */
export interface ColdWalletForm {
  unit: string;
  amount: number;
  code: string;
}
 

/**
 * 转入明细参数类型声明
 */
export interface CoinTransferQueryParam extends PageQueryParam {
  unit: string;
  property?: string | null;
  direction?: string | null;
}


/**
 * 转入明细分页项类型
 */
export type CoinTransferPageResult = PageResult<CoinTransferItem[]>;

/**
 * 转入明细列表项声明
 */
export interface CoinTransferItem {
  id: number;
}