// 自动生成模板TwiActFinish
package twi

import (
	"courseSign/server/global"
	
)

// TwiActFinish 结构体
type TwiActFinish struct {
      global.GVA_MODEL
      UserId *int `json:"userId" form:"userId" gorm:"column:user_id;not null;index;comment:用户编号;"`  // 用户编号
      TwiActId  *int `json:"twiActId" form:"twiActId" gorm:"column:twi_act_id;not null;index;comment:活动编号;"`  // 活动编号
      RewardType  *int `json:"rewardType" form:"rewardType" gorm:"column:reward_type;not null;comment:奖励类型;size:10;"` // 奖励类型
      Amount  *float64 `json:"amount" form:"amount" gorm:"column:amount;comment:奖励额;type:DECIMAL(10,2);not null;"` // 金额
      Hash  string `json:"hash" form:"hash" gorm:"column:hash;comment:hash值;size:96"` // hash
      Height    *int   `json:"height" form:"height" gorm:"column:height;default:0;comment:;"` // 区块
      Blocktime *int   `json:"blocktime" form:"blocktime" gorm:"column:blocktime;comment:;"` // 区块时间
      // Status  *bool `json:"status" form:"status" gorm:"column:status;comment:0 未完成 1 已完成;default:0;"`
      RewardStatus  *int `json:"rewardStatus" form:"rewardStatus" gorm:"column:reward_status;comment:1 已领取;default:0;size:6;"` // 领取状态 0 待领取 1 已发送待确认 2 已领取成功 3 领取失败
      //UserCommonInfo
      Address string `json:"address" form:"address" gorm:"-" `
      TwiUserName string `json:"twiUserName" form:"twiUserName" gorm:"-"`
}


// TableName TwiActFinish 表名
func (TwiActFinish) TableName() string {
  return "twi_act_finish"
}

const (
      ActionFinishStatusNormal = iota     // 待发送
      ActionFinishStatusSend              // 已发送
      ActionFinishStatusDone              // 已领取
      ActionFinishStatusFailed            // 上链失败
)
