// 自动生成模板Pool
package entrustPool

import (
	"courseSign/server/global"
	
)

// Pool 结构体
type Pool struct {
      global.GVA_MODEL
      Name  string `json:"name" form:"name" gorm:"column:name;comment:;size:72;"`
      IsSync  *bool `json:"isSync" form:"isSync" gorm:"column:is_sync;comment:;"`
      Tickets  *int32 `json:"tickets" form:"tickets" gorm:"column:tickets;comment:;size:10;default:0"`
      TicketLimit  *int32 `json:"ticketLimit" form:"ticketLimit" gorm:"column:ticket_limit;comment:;default:500"`
      LastTime  *int32 `json:"lastTime" form:"lastTime" gorm:"column:last_time;comment:;default:0;"`
      MinerAddr  string `json:"minerAddr" form:"minerAddr" gorm:"column:miner_addr;comment:;size:72;"`
      FeeAddr string `json:"feeAddr" form:"feeAddr" gorm:"column:fee_addr;size:72"`
      FeeRate  *int32 `json:"feeRate" form:"feeRate" gorm:"column:fee_rate;default:10;comment:;"`
      IsShow  *bool `json:"isShow" form:"isShow" gorm:"column:is_show;comment:;"`
      IsAdmin  *bool `json:"isAdmin" form:"isAdmin" gorm:"column:is_admin;default:0;comment:;"`
      Creator  string `json:"creator" form:"creator" gorm:"column:creator;comment:;size:72;"`
      NameNormal  *bool `json:"nameNormal" form:"nameNormal" gorm:"column:name_normal;default:1;comment:;"`
}


// TableName Pool 表名
func (Pool) TableName() string {
  return "pool"
}

type PoolNameReq struct {
      Name string `json:"name"`
      MinerAddr string `json:"minerAddr"`
      Creator string `json:"creator"`
}

const PoolTicketLimit = 300

const (
      PoolNormalAddr = iota
      PoolAdminAddr
)


const PoolInvitorReward = 30 // 推广奖 用户投票1票 30BTY 最高可得300BTY
const PoolInvitorRewardMax = 300  // 最高累计300bty
const PoolVoteReward = 1 // 投票奖 用户产出5bty 推广人可得 1BTY
const PoolRewardExpireDay = 100  // 新用户登录100天
const PoolRewardAddDay = 100  // 新用户绑定推特和电报 延长奖励天数





