package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type LineCoinnetwork struct {
	models.Model

	NetworkName   string          `json:"networkName" gorm:"type:varchar(255);comment:网络名称"`
	TokenName     string          `json:"tokenName" gorm:"type:varchar(255);comment:网络token名称"`
	ArrivalNum    int64           `json:"arrivalNum" gorm:"type:int;comment:充值区块确认数"`
	UnlockNum     int64           `json:"unlockNum" gorm:"type:int;comment:提现解锁确认数"`
	UnlockTime    int64           `json:"unlockTime" gorm:"type:int;comment:提现确认平均时间，单位分钟"`
	Fee           decimal.Decimal `json:"fee" gorm:"type:decimal(32,6);comment:网络手续费(百分比)"`
	MinWithdrawal decimal.Decimal `json:"minWithdrawal" gorm:"type:decimal(32,6);comment:最小提现金额"`
	Status        int             `json:"status" gorm:"type:int;comment:状态 1 启用 2 禁用"`
	models.ModelTime
	models.ControlBy
}

func (LineCoinnetwork) TableName() string {
	return "line_coinnetwork"
}

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

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

type VtsCoinNetWorkDB struct {
	Id          int     `json:"id"`
	NetworkName string  `json:"network_name"`
	TokenName   string  `json:"token_name"`
	ArrivalNum  int     `json:"arrival_num"`
	UnlockNum   int     `json:"unlock_num"`
	UnlockTime  int     `json:"unlock_time"`
	Fee         float64 `json:"fee"`
}
