package models

import (
	"time"

	"go-admin/common/models"
)

type LineCointonetwork struct {
	models.Model

	CoinId                   int64     `json:"coinId" gorm:"type:int unsigned;comment:币种id"`
	NetworkId                int64     `json:"networkId" gorm:"type:int unsigned;comment:公链网络id"`
	IsMain                   int64     `json:"isMain" gorm:"type:int unsigned;comment:是否主网--1否,3是.比如BTC在BTC网络中就属于主网"`
	IsDeposit                int64     `json:"isDeposit" gorm:"type:int;comment:是否开启充值:1==否,3==是"`
	IsWithdraw               int64     `json:"isWithdraw" gorm:"type:int unsigned;comment:是否开启提现:1==否,3==是"`
	CoinCode                 string    `json:"coinCode" gorm:"type:varchar(255);comment:币种代号"`
	Token                    string    `json:"token" gorm:"type:varchar(255);comment:代币token"`
	MinChargeNum             string    `json:"minChargeNum" gorm:"type:decimal(32,8);comment:最小充值数量"`
	MinOutNum                string    `json:"minOutNum" gorm:"type:decimal(32,8);comment:单笔最小提币数量"`
	MaxOutNum                string    `json:"maxOutNum" gorm:"type:decimal(32,8);comment:单笔最大提币数量"`
	TransferFee              string    `json:"transferFee" gorm:"type:decimal(32,8);comment:提币手续费"`
	DetailCode               string    `json:"detailCode" gorm:"type:varchar(255);comment:币种全称"`
	NetworkName              string    `json:"networkName" gorm:"type:varchar(255);comment:公链网络简称"`
	TokenName                string    `json:"tokenName" gorm:"type:varchar(255);comment:公链网络全称"`
	ChargeType               int64     `json:"chargeType" gorm:"type:int;comment:手续费类型 1==固定 3==百分比"`
	RechargeSwitchTime       time.Time `json:"rechargeSwitchTime" gorm:"type:timestamp(6);comment:充值开关时间"`
	WithdrawSwitchTime       time.Time `json:"withdrawSwitchTime" gorm:"type:timestamp(6);comment:提币开关时间"`
	IsoutsideWithdrawVerify  int64     `json:"isoutsideWithdrawVerify" gorm:"type:int;comment:是否开启外部提币免审1==否3==是"`
	OutsideWithdrawVerifyNum string    `json:"outsideWithdrawVerifyNum" gorm:"type:decimal(32,8);comment:外部提币免审阈值"`
	IsinsideTransferVerify   int64     `json:"isinsideTransferVerify" gorm:"type:int;comment:是否开启内部转账免审1==否3==是"`
	InsidetransferVerifyNum  string    `json:"insidetransferVerifyNum" gorm:"type:decimal(32,8);comment:内部转账免审阈值"`
	EverydaymaxWithdrawNum   string    `json:"everydaymaxWithdrawNum" gorm:"type:decimal(32,8);comment:每日最大累计提币数量"`
	EverydaymaxVerifyNum     string    `json:"everydaymaxVerifyNum" gorm:"type:decimal(32,8);comment:每日最大免审累计数量"`
	Isinsidetransferfee      int64     `json:"isinsidetransferfee" gorm:"type:int;comment:是否开启内部转账免手续费1==否3==是"`
	models.ModelTime
	models.ControlBy
}

func (LineCointonetwork) TableName() string {
	return "line_cointonetwork"
}

func (e *LineCointonetwork) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *LineCointonetwork) GetId() interface{} {
	return e.Id
}

type VtsCoinToNetWorkDB struct {
	CoinId      int     `json:"coin_id"`
	CoinCode    string  `json:"coin_code"`
	DetailCode  string  `json:"detail_code"`
	NetworkId   int     `json:"network_id"`
	NetWorkName string  `json:"network_name"`
	TokenName   string  `json:"token_name"`
	TransferFee float64 `json:"transfer_fee"`
}

type VtsCoinToNetWorkResp struct {
	CoinId          int    `json:"coin_id"`
	CoinCode        string `json:"coin_code"`
	DetailCode      string `json:"detail_code"`
	NetWorkId       int    `json:"network_id"`
	NetWorkName     string `json:"network_name"`
	TokenName       string `json:"token_name"`
	TransferFee     string `json:"transfer_fee"`
	TransferFeeUsdt string `json:"transfer_fee_usdt"`
}

type RechargeAddressListResp struct {
	Address    string `json:"address"`     //地址
	MinNum     string `json:"min_num"`     //最小充值数量
	ArrivalNum int    `json:"arrival_num"` //充值区块确认数
	UnlockNum  int    `json:"unlock_num"`  //提现解锁确认数
}
