package dto

import (
    "time"

	"go-admin/app/admin/models"
	"go-admin/common/dto"
	common "go-admin/common/models"
)

type LineCointonetworkGetPageReq struct {
	dto.Pagination     `search:"-"`
    LineCointonetworkOrder
}

type LineCointonetworkOrder struct {
    Id string `form:"idOrder"  search:"type:order;column:id;table:line_cointonetwork"`
    CoinId string `form:"coinIdOrder"  search:"type:order;column:coin_id;table:line_cointonetwork"`
    NetworkId string `form:"networkIdOrder"  search:"type:order;column:network_id;table:line_cointonetwork"`
    IsMain string `form:"isMainOrder"  search:"type:order;column:is_main;table:line_cointonetwork"`
    IsDeposit string `form:"isDepositOrder"  search:"type:order;column:is_deposit;table:line_cointonetwork"`
    IsWithdraw string `form:"isWithdrawOrder"  search:"type:order;column:is_withdraw;table:line_cointonetwork"`
    CoinCode string `form:"coinCodeOrder"  search:"type:order;column:coin_code;table:line_cointonetwork"`
    Token string `form:"tokenOrder"  search:"type:order;column:token;table:line_cointonetwork"`
    MinChargeNum string `form:"minChargeNumOrder"  search:"type:order;column:min_charge_num;table:line_cointonetwork"`
    MinOutNum string `form:"minOutNumOrder"  search:"type:order;column:min_out_num;table:line_cointonetwork"`
    MaxOutNum string `form:"maxOutNumOrder"  search:"type:order;column:max_out_num;table:line_cointonetwork"`
    TransferFee string `form:"transferFeeOrder"  search:"type:order;column:transfer_fee;table:line_cointonetwork"`
    CreateBy string `form:"createByOrder"  search:"type:order;column:create_by;table:line_cointonetwork"`
    UpdateBy string `form:"updateByOrder"  search:"type:order;column:update_by;table:line_cointonetwork"`
    CreatedAt string `form:"createdAtOrder"  search:"type:order;column:created_at;table:line_cointonetwork"`
    UpdatedAt string `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:line_cointonetwork"`
    DeletedAt string `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:line_cointonetwork"`
    DetailCode string `form:"detailCodeOrder"  search:"type:order;column:detail_code;table:line_cointonetwork"`
    NetworkName string `form:"networkNameOrder"  search:"type:order;column:network_name;table:line_cointonetwork"`
    TokenName string `form:"tokenNameOrder"  search:"type:order;column:token_name;table:line_cointonetwork"`
    ChargeType string `form:"chargeTypeOrder"  search:"type:order;column:charge_type;table:line_cointonetwork"`
    RechargeSwitchTime string `form:"rechargeSwitchTimeOrder"  search:"type:order;column:recharge_switch_time;table:line_cointonetwork"`
    WithdrawSwitchTime string `form:"withdrawSwitchTimeOrder"  search:"type:order;column:withdraw_switch_time;table:line_cointonetwork"`
    IsoutsideWithdrawVerify string `form:"isoutsideWithdrawVerifyOrder"  search:"type:order;column:isoutside_withdraw_verify;table:line_cointonetwork"`
    OutsideWithdrawVerifyNum string `form:"outsideWithdrawVerifyNumOrder"  search:"type:order;column:outside_withdraw_verify_num;table:line_cointonetwork"`
    IsinsideTransferVerify string `form:"isinsideTransferVerifyOrder"  search:"type:order;column:isinside_transfer_verify;table:line_cointonetwork"`
    InsidetransferVerifyNum string `form:"insidetransferVerifyNumOrder"  search:"type:order;column:insidetransfer_verify_num;table:line_cointonetwork"`
    EverydaymaxWithdrawNum string `form:"everydaymaxWithdrawNumOrder"  search:"type:order;column:everydaymax_withdraw_num;table:line_cointonetwork"`
    EverydaymaxVerifyNum string `form:"everydaymaxVerifyNumOrder"  search:"type:order;column:everydaymax_verify_num;table:line_cointonetwork"`
    Isinsidetransferfee string `form:"isinsidetransferfeeOrder"  search:"type:order;column:isinsidetransferfee;table:line_cointonetwork"`
    
}

func (m *LineCointonetworkGetPageReq) GetNeedSearch() interface{} {
	return *m
}

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

func (s *LineCointonetworkInsertReq) Generate(model *models.LineCointonetwork)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.CoinId = s.CoinId
    model.NetworkId = s.NetworkId
    model.IsMain = s.IsMain
    model.IsDeposit = s.IsDeposit
    model.IsWithdraw = s.IsWithdraw
    model.CoinCode = s.CoinCode
    model.Token = s.Token
    model.MinChargeNum = s.MinChargeNum
    model.MinOutNum = s.MinOutNum
    model.MaxOutNum = s.MaxOutNum
    model.TransferFee = s.TransferFee
    model.CreateBy = s.CreateBy // 添加这而，需要记录是被谁创建的
    model.DetailCode = s.DetailCode
    model.NetworkName = s.NetworkName
    model.TokenName = s.TokenName
    model.ChargeType = s.ChargeType
    model.RechargeSwitchTime = s.RechargeSwitchTime
    model.WithdrawSwitchTime = s.WithdrawSwitchTime
    model.IsoutsideWithdrawVerify = s.IsoutsideWithdrawVerify
    model.OutsideWithdrawVerifyNum = s.OutsideWithdrawVerifyNum
    model.IsinsideTransferVerify = s.IsinsideTransferVerify
    model.InsidetransferVerifyNum = s.InsidetransferVerifyNum
    model.EverydaymaxWithdrawNum = s.EverydaymaxWithdrawNum
    model.EverydaymaxVerifyNum = s.EverydaymaxVerifyNum
    model.Isinsidetransferfee = s.Isinsidetransferfee
}

func (s *LineCointonetworkInsertReq) GetId() interface{} {
	return s.Id
}

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

func (s *LineCointonetworkUpdateReq) Generate(model *models.LineCointonetwork)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.CoinId = s.CoinId
    model.NetworkId = s.NetworkId
    model.IsMain = s.IsMain
    model.IsDeposit = s.IsDeposit
    model.IsWithdraw = s.IsWithdraw
    model.CoinCode = s.CoinCode
    model.Token = s.Token
    model.MinChargeNum = s.MinChargeNum
    model.MinOutNum = s.MinOutNum
    model.MaxOutNum = s.MaxOutNum
    model.TransferFee = s.TransferFee
    model.UpdateBy = s.UpdateBy // 添加这而，需要记录是被谁更新的
    model.DetailCode = s.DetailCode
    model.NetworkName = s.NetworkName
    model.TokenName = s.TokenName
    model.ChargeType = s.ChargeType
    model.RechargeSwitchTime = s.RechargeSwitchTime
    model.WithdrawSwitchTime = s.WithdrawSwitchTime
    model.IsoutsideWithdrawVerify = s.IsoutsideWithdrawVerify
    model.OutsideWithdrawVerifyNum = s.OutsideWithdrawVerifyNum
    model.IsinsideTransferVerify = s.IsinsideTransferVerify
    model.InsidetransferVerifyNum = s.InsidetransferVerifyNum
    model.EverydaymaxWithdrawNum = s.EverydaymaxWithdrawNum
    model.EverydaymaxVerifyNum = s.EverydaymaxVerifyNum
    model.Isinsidetransferfee = s.Isinsidetransferfee
}

func (s *LineCointonetworkUpdateReq) GetId() interface{} {
	return s.Id
}

// LineCointonetworkGetReq 功能获取请求参数
type LineCointonetworkGetReq struct {
     Id int `uri:"id"`
}
func (s *LineCointonetworkGetReq) GetId() interface{} {
	return s.Id
}

// LineCointonetworkDeleteReq 功能删除请求参数
type LineCointonetworkDeleteReq struct {
	Ids []int `json:"ids"`
}

func (s *LineCointonetworkDeleteReq) GetId() interface{} {
	return s.Ids
}
