package models

import (
	"time"

	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type MemberWithdrawalLog struct {
	models.Model

	NetworkId   int             `json:"networkId" gorm:"type:int;comment:网络id"`
	NetworkName string          `json:"networkName" gorm:"type:varchar(50);comment:网络名称"`
	Coin        string          `json:"coin" gorm:"type:varchar(50);comment:提现币种"`
	ToAddress   string          `json:"toAddress" gorm:"type:varchar(255);comment:提现地址"`
	Hash        string          `json:"hash" gorm:"type:varchar(255);comment:提现hash"`
	UserId      int             `json:"userId" gorm:"type:bigint;comment:用户id"`
	Amount      decimal.Decimal `json:"amount" gorm:"type:decimal(32,6);comment:提现金额(U)"`
	Status      string          `json:"status" gorm:"type:varchar(20);comment:提现状态(member_withdrawal_status)"`
	ConfirmTime *time.Time      `json:"confirmTime" gorm:"type:datetime;comment:确认时间"`
	Fee         decimal.Decimal `json:"fee" gorm:"type:decimal(10,2);comment:手续费比例"`
	Remark      string          `json:"remark" gorm:"type:varchar(255);comment:备注"`
	UserName    string          `json:"userName" gorm:"-"`
	NickName    string          `json:"nickName" gorm:"-"`
	models.ModelTime
	models.ControlBy
}

func (MemberWithdrawalLog) TableName() string {
	return "member_withdrawal_log"
}

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

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