package models

import (
    "time"

	"go-admin/common/models"

)

type LineRecharge struct {
    models.Model
    
    CoinId int64 `json:"coinId" gorm:"type:int;comment:币种id"` 
    UserId int64 `json:"userId" gorm:"type:int;comment:用户Id"` 
    Confirms string `json:"confirms" gorm:"type:int;comment:区块确认数"` 
    TranType string `json:"tranType" gorm:"type:int;comment:类型：1线上，2内部"` 
    BlockIndex string `json:"blockIndex" gorm:"type:int;comment:区块高度"` 
    Amount string `json:"amount" gorm:"type:decimal(32,8);comment:数量"` 
    Account string `json:"account" gorm:"type:varchar(255);comment:账户"` 
    Address string `json:"address" gorm:"type:varchar(255);comment:地址"` 
    Txid string `json:"txid" gorm:"type:varchar(255);comment:交易id"` 
    BlockTime time.Time `json:"blockTime" gorm:"type:timestamp;comment:同步时间"` 
    TimeReceived time.Time `json:"timeReceived" gorm:"type:timestamp;comment:确认时间"` 
    MainCoin string `json:"mainCoin" gorm:"type:varchar(255);comment:充值网络"` 
    OrderNo string `json:"orderNo" gorm:"type:varchar(50);comment:订单号"` 
    Status string `json:"status" gorm:"type:int;comment:状态1==进行中暂时保留，2==成功，3==失败"` 
    State string `json:"state" gorm:"type:int;comment:来源状态 0 待審核 1 審核成功 2 審核駁回 3交易成功 4交易失敗"` 
    Fee string `json:"fee" gorm:"type:decimal(32,8);comment:手续费"` 
    AddressFrom string `json:"addressFrom" gorm:"type:varchar(255);comment:来源地址"` 
    models.ModelTime
    models.ControlBy
}

func (LineRecharge) TableName() string {
    return "line_recharge"
}

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

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