package yb_activity_register

import (
	"time"
)

// YbActivityRegister 活动报名表
type YbActivityRegister struct {
	ActivityRegisterID uint32    `gorm:"primaryKey;column:activity_register_id;type:int(11) unsigned;not null" json:"-"`
	ActivityID         uint32    `gorm:"index:inx_activity_id;column:activity_id;type:int(11) unsigned;not null;default:0" json:"activityId"` // 活动ID
	UserID             uint64    `gorm:"index:inx_user_id;column:user_id;type:bigint(20) unsigned;not null;default:0" json:"userId"`          // 微信用户表ID
	CompanyID          uint64    `gorm:"column:company_id;type:bigint(20) unsigned;not null;default:0" json:"companyId"`                      // 客户ID
	CompanyName        string    `gorm:"column:company_name;type:varchar(100);not null;default:''" json:"companyName"`                        // 客户名称
	SellerName         string    `gorm:"column:seller_name;type:varchar(50);not null;default:''" json:"sellerName"`                           // 销售名称
	RealName           string    `gorm:"column:real_name;type:varchar(32);not null;default:''" json:"realName"`                               // 用户实际名称
	Mobile             string    `gorm:"column:mobile;type:varchar(32);not null;default:''" json:"mobile"`                                    // 用户手机号
	RegisterState      uint8     `gorm:"column:register_state;type:tinyint(4) unsigned;not null;default:0" json:"registerState"`              // 报名状态 0-取消报名 1-已报名
	CreateTime         time.Time `gorm:"column:create_time;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"createTime"`              // 创建时间
}

// TableName get sql table name.获取数据库表名
func (m *YbActivityRegister) TableName() string {
	return "yb_activity_register"
}

// YbActivityRegisterColumns get sql column name.获取数据库列名
var YbActivityRegisterColumns = struct {
	ActivityRegisterID string
	ActivityID         string
	UserID             string
	CompanyID          string
	CompanyName        string
	SellerName         string
	RealName           string
	Mobile             string
	RegisterState      string
	CreateTime         string
}{
	ActivityRegisterID: "activity_register_id",
	ActivityID:         "activity_id",
	UserID:             "user_id",
	CompanyID:          "company_id",
	CompanyName:        "company_name",
	SellerName:         "seller_name",
	RealName:           "real_name",
	Mobile:             "mobile",
	RegisterState:      "register_state",
	CreateTime:         "create_time",
}
