model

package
v1.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TbMenu string = "s_menu"

	MenuIsButtonYes byte = 1
	MenuIsButtonNo  byte = 2
)
View Source
const (
	TbAdminUser string = "s_admin_user"

	AdminUserStatusEnable  byte = 1
	AdminUserStatusDisable byte = 2
)
View Source
const (
	BetRuleNameBig         string = "大"
	BetRuleNameSmall       string = "小"
	BetRuleNameSingle      string = "单"
	BetRuleNameDouble      string = "双"
	BetRuleNameTriplet     string = "豹子"
	BetRuleNameLong        string = "龙"
	BetRuleNameHu          string = "虎"
	BetRuleNameHe          string = "合"
	BetRuleNameBigDan      string = "大单"
	BetRuleNameSmallDan    string = "小单"
	BetRuleNameBigDouble   string = "大双"
	BetRuleNameSmallDouble string = "小双"
	BetRuleNamePair        string = "对子(含豹子)" //
	BetRuleNameStraight    string = "顺子"
	BetRuleNameSpecTriplet string = "指定豹子"
	BetRuleNameDwd4        string = "定位胆4"
	BetRuleNameDwd5        string = "定位胆5"
	BetRuleNameDwd6        string = "定位胆6"
	BetRuleNameDwd7        string = "定位胆7"
	BetRuleNameDwd8        string = "定位胆8"
	BetRuleNameDwd9        string = "定位胆9"
	BetRuleNameDwd10       string = "定位胆10"
	BetRuleNameDwd11       string = "定位胆11"
	BetRuleNameDwd12       string = "定位胆12"
	BetRuleNameDwd13       string = "定位胆13"
	BetRuleNameDwd14       string = "定位胆14"
	BetRuleNameDwd15       string = "定位胆15"
	BetRuleNameDwd16       string = "定位胆16"
	BetRuleNameDwd17       string = "定位胆17"
)
View Source
const (
	BetStatusOrdered     int = 1 //已下单
	BetStatusSettled     int = 2 //已结算
	BetStatusOrderCancel int = 3 //已取消
)
View Source
const (
	BetFanshuiFlagNo  int = 1 //未返水
	BetFanshuiFlagYes int = 2 //已返水
)
View Source
const (
	TbGroupAdmin string = "t_group_admin"

	GroupProxyYes int = 1
	GroupProxyNo  int = 2
)
View Source
const (
	TbGroupUser string = "t_group_user"

	//user是否在组中
	GroupUserLeftYes int = 1
	GroupUserLeftNo  int = 2
)
View Source
const (
	ProjectName      = "bot-api"
	GroupCompanyName = "鑫利小钱包"

	ApiErrBindParam      int = 400 // 入参错误检测
	ApiErrAuthToken      int = 401 // 令牌认证错误
	ApiErrParamTamper    int = 402 // 参数篡改验证
	ApiErrKickedUser     int = 403 // 用户在其他地方登录而下线
	ApiErrHiddeUser      int = 404 // 用户禁止访问
	ApiErrPermissionUser int = 405 // 用户访问权限受限
	ApiErrServer         int = 500 // 服务内部错误
)
View Source
const (
	SymbolTronTRX string = "TRX" //主币
	SymbolTRCUSDT string = "TRC-USDT"
)
View Source
const (
	SysCfgShakeBaseBetDef     int     = 10   //手摇最低下注额
	SysCfgGroupStraightFeeDef float32 = 0.1  //集团针对顺子扣点比例
	SysCfgGroupTripleFeeDef   float32 = 0.05 //集团针对豹子扣点比例
	SysCfgOwnerFeeDef         float32 = 0.04 //群主扣点比例
	SysCfgUserFanshuiPercent  float32 = 0.01 //用户返水比例
	SysCfgUserFanshuiBase     int     = 100  //用户返水基数
)

定义系统群默认的配制

View Source
const (
	//定义游戏的类别
	GameIDK3    int = 11 //经典快三
	GameID5D    int = 21 //5D
	GameIDWinGo int = 31

	//游戏状态定义
	GameStatusON  int = 1 //已开启
	GameStatusOFF int = 2 //已关闭
)
View Source
const (
	OpenCanShakeNo  int = 1 //不能手摇开号
	OpenCanShakeYes int = 2 //可以手摇开号
)
View Source
const (
	TbUserWithdraw = "t_user_withdraw"

	//提现状态定义
	WithdrawStatusRequest          int = 1  //审核中
	WithdrawStatusPassPendingPay   int = 2  //审核通过-待支付
	WithdrawStatusPassOfflinePay   int = 31 //审核通过-线下支付
	WithdrawStatusPayOnlineSuccess int = 32 ////线上支付成功
	WithdrawStatusPayOnlineFail    int = 33 ////线上支付失败
	WithdrawStatusReject           int = 3  //审核不通过
)
View Source
const (
	OSTypeWindows string = "windows"
	OSTypeMac     string = "darwin"
)
View Source
const (
	VerStatusEnable  int = 1
	VerStatusDisable int = 2
)
View Source
const (
	TbBetK3 = "b_bet_k3"
)
View Source
const (
	TbGroupUserMoneyRec = "t_group_user_money_rec"
)
View Source
const (
	TbOpenK3 string = "b_open_k3"
)
View Source
const (
	TbRedEnveloper string = "b_red_enveloper"
)
View Source
const (
	TbRole string = "s_role"
)
View Source
const (
	TbSysEventLog = "s_event_log"
)
View Source
const (
	TbSysException = "s_exception"
)
View Source
const (
	TbUser = "t_user"
)
View Source
const (
	TbVerUpgrade = "b_version_upgrade"
)

Variables

View Source
var (
	MSGCmdFanshui        = MsgCmd{Name: "反水", Demo: "反水 或 fs", CommandPattern: "^(反水|fs)$"}
	MSGCmdCancelOrder    = MsgCmd{Name: "取消下注", Demo: "取消 或 qx", CommandPattern: "^(取消|qx)$"}
	MSGCmdGKHB           = MsgCmd{Name: "公开红包", Demo: "gkhb 888u 88", CommandPattern: "^(gkhb)\\s+(\\d+)u\\s+(\\d+)$"}
	MSGCmd1V1HB          = MsgCmd{Name: "一对一红包", Demo: "hb 888u @用户名", CommandPattern: "^(hb)\\s+(\\d+)u\\s+@(\\w+)$"}
	MSGCmdTransferToUser = MsgCmd{Name: "转账", Demo: "@用户 转账 100", CommandPattern: "^@(\\w+)\\s+转[账帐]\\s+(\\d+)$"}

	//玩家查询指令
	MSGCmdGroupAndChatWinLos = MsgCmd{Name: "查询今天在集团与本群输赢", Demo: "slsy", CommandPattern: "^(slsy)$"}
	MSGCmdGroupUserBalance   = MsgCmd{Name: "查询余额", Demo: "ye", CommandPattern: "^(ye)$"}
	MSGCmdGroupSearch        = MsgCmd{Name: "查询公群", Demo: "查666", CommandPattern: "^(查)(\\w+)$"}

	//管理员指令
	MSGCmdGroupWinLoss       = MsgCmd{Name: "查看昨天本群输赢【管理员指令】", Demo: "本群输赢 或 bqsy", CommandPattern: "^(本群输赢|bqsy)$"}
	MSGCmdTop10LossYesterday = MsgCmd{Name: "查询昨天亏损前10名单【管理员指令】", Demo: "plzs", CommandPattern: "^(plzs)$"}
	MSGCmdTop10WinYesterday  = MsgCmd{Name: "查询昨天赢利前10名单【管理员指令】", Demo: "slphb", CommandPattern: "^(slphb)$"}
)

定义相关文字命令

View Source
var (
	TbChatGroup string = "t_chat_group"

	//群状态定义
	ChatGroupStatusNormal int = 1 //正常
	ChatGroupStatusKicked int = 2 //踢出
	ChatGroupStatusDelete int = 3 //解散
)
View Source
var (
	MoneyTypeBet              = myenum.NewENum("会员下注", 3)
	MoneyTypeBetWin           = myenum.NewENum("下注盈利", 31) //包括了本金
	MoneyTypeRecharge         = myenum.NewENum("充值款", 4)
	MoneyTypeWithdraw         = myenum.NewENum("提现款", 5)
	MoneyTypeTransferIn       = myenum.NewENum("代充转入款", 6)
	MoneyTypeTransferOut      = myenum.NewENum("代充转出款", 61)
	MoneyTypePlayerFanShui    = myenum.NewENum("玩家返水", 7)
	MoneyTypeBankerOutFanShui = myenum.NewENum("庄家出返水", 71)
	MoneyTypeCreditIn         = myenum.NewENum("总台上分", 8)
	MoneyTypeCreditOut        = myenum.NewENum("总台下分", 81)
	MoneyTypeGroupFee         = myenum.NewENum("集团扣点赢利", 9)
	MoneyTypeBankerFee        = myenum.NewENum("庄家扣点赢利", 91)
	MoneyTypeBankerWin        = myenum.NewENum("庄家赌赢", 92)
	MoneyTypeBankerLoss       = myenum.NewENum("庄家赌输", 93)
	MoneyTypeHBOut            = myenum.NewENum("红包支出", 10)
	MoneyTypeHBIn             = myenum.NewENum("红包收入", 101)
)
View Source
var (
	OpenStatusBet    = myenum.NewENum("待开盘,可以下注", 1)
	OpenStatusClose  = myenum.NewENum("封盘,待开奖", 2)
	OpenStatusOpened = myenum.NewENum("已开盘", 3)
)
View Source
var (
	RedHBTypeGK  = myenum.NewENum("群公开红包", 1)
	RedHBType1V1 = myenum.NewENum("群里一对一红包", 2)
)

Functions

func BaseBetRuleMap added in v1.0.10

func BaseBetRuleMap() map[string]BetRule

func BetFormatMessage added in v1.1.17

func BetFormatMessage() string

func ListMoneyType added in v1.1.19

func ListMoneyType() []myenum.ENum[int]

func MapBetRuleName added in v1.0.10

func MapBetRuleName() map[string]bool

func MapMoneyType

func MapMoneyType() map[int]string

Types

type AdminUser

type AdminUser struct {
	Id         int64  `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" ` //是否可空:NO
	Name       string `gorm:"type:varchar(100);uniqueIndex:name;comment:用户名" json:"name"`
	LoginPwd   string `gorm:"type:varchar(100)" json:"login_pwd" ` //是否可空:NO
	Enable     byte   `gorm:"type:tinyint;not null;default:1;comment:启用禁用:1启用 2禁用" json:"enable"`
	RoleID     int64  `gorm:"type:bigint;default:0;comment:角色ID" json:"role_id"`
	LoginIP    string `gorm:"type:varchar(100)" json:"login_ip"`
	LoginTime  int64  `gorm:"type:bigint" json:"login_time"`
	Remark     string `gorm:"type:varchar(100)" json:"remark"`
	CreateTime int64  `gorm:"type:bigint" json:"create_time" ` //是否可空:NO
}

func (*AdminUser) TableName

func (self *AdminUser) TableName() string

type BetK3

type BetK3 struct {
	Id          int64                    `gorm:"type:bigint;primaryKey;autoIncrease" json:"id" `
	TgGroupId   int64                    `gorm:"type:bigint;index:tg_group_id;default:0;comment:Tg群Id" json:"tg_group_id"`
	TgUserId    int64                    `gorm:"type:bigint;index:tg_user_id;default:0;comment:tg用户名ID" json:"tg_user_id"`
	DisplayName string                   `gorm:"type:varchar(100);comment:群用户显示名称" json:"display_name"`
	ExpectNo    string                   `gorm:"type:varchar(100);index:expect_no;comment:期号" json:"expect_no"`
	BetType     string                   `gorm:"type:varchar(100);index:bet_type;comment:下注类型" json:"bet_type"`
	BetAmount   float64                  `gorm:"type:double;default:0;comment:下注金额" json:"bet_amount"`
	Odds        float64                  `gorm:"type:double;comment:赔率" json:"odds"`
	Status      int                      `gorm:"type:int;comment:下单状态" json:"status" `
	WinMoney    float64                  `gorm:"type:double;comment:赢钱数量,0表示没有中" json:"win_money"`
	BetTime     int64                    `gorm:"type:bigint;comment:下单时间" json:"bet_time"`
	OpenTime    int64                    `gorm:"type:bigint;comment:开盘时间" json:"open_time"`
	OpenNum     myjson.JsonObject[[]int] `gorm:"type:json;comment:开奖号码" json:"open_num"`
	FanShuiFlag int                      `gorm:"type:int;default:1;index:fan_shui_flag;comment:'1:未反水,2:已反水'" json:"fan_shui_flag"`
	MessageID   int                      `gorm:"type:int(12);default:0;comment:telegram message ID" json:"message_id"`
}

func (*BetK3) FormatLineMsg

func (self *BetK3) FormatLineMsg() string

func (*BetK3) MathWinMoneyBy

func (self *BetK3) MathWinMoneyBy(openInfo OpenK3) float64

func (*BetK3) TableName

func (self *BetK3) TableName() string

type BetRule added in v1.0.10

type BetRule struct {
	Name           string  `json:"name"`            // 玩法名称
	BetDemo        string  `json:"bet_demo"`        // 下注例子
	CommandPattern string  `json:"command_pattern"` // 命令匹配的正则表达式
	MinBet         int     `json:"min_bet"`         //最低下注额
	MaxBet         int     `json:"max_bet"`         // 最高下注金额
	Odds           float64 `json:"odds"`            // 赔率
}

玩法相关定义 玩法,下单格式,赔率,最低下注额,最高下注额,

type ChatGroup

type ChatGroup struct {
	Id             int64                                 `gorm:"type:bigint;primaryKey;not null;comment:群组ID" json:"id"`
	Title          string                                `gorm:"type:varchar(200);comment:群组标题" json:"title"`
	GameId         int                                   `gorm:"type:int;comment:游戏ID" json:"game_id"`
	GameStatus     int                                   `gorm:"type:int;comment:群游戏状态" json:"game_status"`
	GameFrequency  int                                   `gorm:"type:int;default:1;comment:游戏频率,单位分钟" json:"game_frequency"`
	Status         int                                   `gorm:"type:tinyint(5);comment:群的状态" json:"status"`
	ConfigOdds     myjson.JsonObject[map[string]BetRule] `gorm:"type:json;comment:玩法及配率" json:"config_odds"`
	ConfigOther    myjson.JsonObject[GroupOtherConfig]   `gorm:"type:json;comment:群其它相关配制" json:"config_other"`
	CommissionRate float64                               `gorm:"type:double;default:0.03;comment:群主抽每局客损的的3%-5%" json:"commission_rate" ` //
	ExpectedNum    int                                   `gorm:"type:int(10);default:0;comment:游戏开盘的期数总计" json:"expected_num" `           //记录游戏的总期数
	InviteUrl      string                                `gorm:"type:varchar(100);default:'';comment:公群邀请链接" json:"invite_url"`
	Remark         string                                `gorm:"type:varchar(1000);default:'';comment:群组介绍" json:"remark"`
	CreateTime     int64                                 `gorm:"type:bigint" json:"create_time" ` //是否可空:NO
}

func (*ChatGroup) CreateNewExpectNo added in v1.1.18

func (self *ChatGroup) CreateNewExpectNo() string

func (*ChatGroup) GameHelp

func (self *ChatGroup) GameHelp() string

func (*ChatGroup) TableName

func (self *ChatGroup) TableName() string

type GroupAdmin

type GroupAdmin struct {
	Id          int64 `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" ` //是否可空:NO
	ChatGroupId int64 `gorm:"type:bigint;comment:chat group id" json:"chat_group_id"`
	TgAdminId   int64 `gorm:"type:bigint;index:tg_admin_id;comment:telegram user id" json:"tg_admin_id"`
	IsProxy     int   `gorm:"type:tinyint(2);default:2;comment:是否代理" json:"is_proxy"`
	CreateTime  int64 `gorm:"type:bigint;default:0" json:"create_time" ` //是否可空:NO
}

func (*GroupAdmin) TableName

func (self *GroupAdmin) TableName() string

type GroupOtherConfig added in v1.1.15

type GroupOtherConfig struct {
	ShakeBaseBet       int     `form:"shake_base_bet" json:"shake_base_bet"`             // 手摇最低下注额
	GroupStraightFee   float32 `form:"group_straight_fee" json:"group_straight_fee"`     //集团针对顺子扣点比例
	GroupTripleFee     float32 `form:"group_triple_fee" json:"group_triple_fee"`         //集团针对豹子扣点比例
	OwnerFee           float32 `form:"owner_fee" json:"owner_fee"`                       //群主扣点比例
	BetOpenImage       string  `form:"bet_open_image" json:"bet_open_image"`             //开盘图
	BetCloseImage      string  `form:"bet_close_image" json:"bet_close_image"`           //封盘图
	UserFanshuiPercent float32 `form:"user_fanshui_percent" json:"user_fanshui_percent"` //用户返水比例
	UserFanshuiBase    int     `form:"user_fanshui_base" json:"user_fanshui_base"`       //用户返水的流水基数
}

群其它配制==>针对赢利部分

func BaseOtherConfig added in v1.1.17

func BaseOtherConfig() GroupOtherConfig

type GroupUser

type GroupUser struct {
	Id             int64   `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" ` //是否可空:NO
	TgUserId       int64   `gorm:"type:bigint;index:tg_user_id;comment:telegram user id" json:"tg_user_id"`
	ChatGroupId    int64   `gorm:"type:bigint;comment:chat group id" json:"chat_group_id"`
	UserName       string  `gorm:"type:varchar(100);default:''" json:"user_name"`
	FirstName      string  `gorm:"type:varchar(100);default:''" json:"first_name"`
	LastName       string  `gorm:"type:varchar(100);default:''" json:"last_name"`
	IsLeft         int     `gorm:"type:int;comment:是否离开群" json:"is_left"`
	CommissionRate float64 `gorm:"type:double;default:0.01;comment:个人返水1%" json:"commission_rate"`
	SignTime       int64   `gorm:"type:bigint;default:0;comment:签到时间" json:"sign_time" ` //是否可空:NO
	CreateTime     int64   `gorm:"type:bigint;default:0" json:"create_time" `            //是否可空:NO
}

func (*GroupUser) DisplayName

func (self *GroupUser) DisplayName() string

func (*GroupUser) TableName

func (self *GroupUser) TableName() string

type GroupUserMoneyRec

type GroupUserMoneyRec struct {
	Id              int64   `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id"` //是否可空:NO
	ChatGroupId     int64   `gorm:"type:bigint;comment:群主ID" json:"chat_group_id"`
	TgUserId        int64   `gorm:"type:bigint;comment:user id" json:"tg_user_id"`
	TxID            string  `gorm:"type:varchar(100);index:tx_id;comment:交易ID" json:"tx_id"`
	AddTime         int64   `gorm:"type:bigint;comment:增加时间" json:"add_time"`
	Symbol          string  `gorm:"type:varchar(20);comment:代币类型" json:"symbol"` //是否可空:NO
	MoneyType       int     `gorm:"type:tinyint;comment:资金类型" json:"money_type" `
	Money           float64 `gorm:"type:double;comment:金额 column:money" json:"money"`
	PreviousBalance float64 `gorm:"type:double;default:0.0;comment:变化前余额 column:previous_balance" json:"previous_balance"`
	Remark          string  `gorm:"type:varchar(150);comment:说明信息" json:"remark"`
}

func (*GroupUserMoneyRec) TableName

func (self *GroupUserMoneyRec) TableName() string

type HBUserInfo added in v1.1.18

type HBUserInfo struct {
	TgUserID    int64   `json:"tg_user_id"`
	DisplayName string  `json:"display_name"`
	Amount      float64 `json:"amount"`
}

红包领用详情

type Menu struct {
	ID             int64                       `gorm:"type:bigint;primaryKey;auto_increment;comment:菜单ID" json:"id"`        // 权限ID
	Name           string                      `gorm:"type:varchar(50);not null;comment:菜单名称" json:"name"`                  // 权限名称
	RouteName      string                      `gorm:"type:varchar(200);not null;comment:路由名称" json:"route_name"`           // 权限路由
	Route          string                      `gorm:"type:varchar(200);not null;comment:菜单路由路径" json:"route"`              // 权限路由
	ParentID       int64                       `gorm:"type:bigint;default:0;comment:上级菜单ID;index" json:"parent_id"`         // 上级权限ID
	IsButton       byte                        `gorm:"type:tinyint;not null;default:2;comment:是否按钮 1是 2否" json:"is_button"` // 是否按钮 1是 2否
	ListPermission myjson.JsonObject[[]string] `gorm:"type:json;comment:路由权限清单(%s:%s, method, path)" json:"list_permission"`
}
func (self *Menu) TableName() string

type MsgCmd added in v1.1.18

type MsgCmd struct {
	Name           string //命令名称
	Demo           string //命令Demo
	CommandPattern string //命令正则表示式
}

文字命令

func ListMsgCmd added in v1.1.18

func ListMsgCmd() []MsgCmd

type OpenK3

type OpenK3 struct {
	Id          int64  `gorm:"bigint;primaryKey;autoIncrement" json:"id"`
	ChatGroupId int64  `gorm:"type:bigint;index:chat_group_id;comment:群组ID" json:"chat_group_id"`
	GameId      int    `gorm:"type:int;comment:游戏ID" json:"game_id"`
	ExpectNo    string `gorm:"type:varchar(64);index:issue_number;comment:期号" json:"expect_no"`
	Status      int    `gorm:"type:int;comment:1待开奖,2已开奖" json:"status"`
	ValueA      int    `gorm:"type:int(11);not null" json:"value_a"`
	ValueB      int    `gorm:"type:int(11);not null" json:"value_b"`
	ValueC      int    `gorm:"type:int(11);not null" json:"value_c"`
	CanShake    int    `gorm:"type:tinyint(2);default:1;comment:'是否可以手摇开号:1:否 2:可以'" json:"can_shake"`
	ShakeUserId int64  `gorm:"type:bigint;default:0;comment:'记录可以手摇的用户ID'" json:"shake_user_id"`
	CreateTime  int64  `gorm:"type:bigint" json:"create_time"`
	CloseTime   int64  `gorm:"type:bigint" json:"close_time"`
}

func (*OpenK3) FormatLineMsg

func (self *OpenK3) FormatLineMsg() string

func (*OpenK3) FormatMessage

func (self *OpenK3) FormatMessage() string

func (*OpenK3) IsBig

func (self *OpenK3) IsBig() bool

是否大

func (*OpenK3) IsEven

func (self *OpenK3) IsEven() bool

是否双数

func (*OpenK3) IsPair added in v1.1.0

func (self *OpenK3) IsPair() bool

func (*OpenK3) IsStraight added in v1.1.0

func (self *OpenK3) IsStraight() bool

func (*OpenK3) IsTriplet

func (self *OpenK3) IsTriplet() bool

func (*OpenK3) LongHuHe

func (self *OpenK3) LongHuHe() string

func (*OpenK3) SumValues

func (self *OpenK3) SumValues() int

func (*OpenK3) TableName

func (self *OpenK3) TableName() string

type RedEnveloper added in v1.1.18

type RedEnveloper struct {
	Id              int64                           `gorm:"type:bigint(20) auto_increment;primary_key;comment:" json:"id"`
	Type            int                             `gorm:"type:tinyint(4);default:0;comment:红包类型:公开红包,一对一红包" json:"type"`
	TgGroupId       int64                           `gorm:"type:bigint;index:tg_group_id;default:0;comment:Tg群Id" json:"tg_group_id"`
	TgUserId        int64                           `gorm:"type:bigint;index:tg_user_id;default:0;comment:tg用户名ID" json:"tg_user_id"`
	DisplayName     string                          `gorm:"type:varchar(100);comment:群用户显示名称" json:"display_name"`
	HBAmount        float64                         `gorm:"type:double;default:0;comment:红包金额" json:"hb_amount"`
	RemainingAmount float64                         `gorm:"type:double;default:0;comment:剩余金额" json:"remaining_amount"`
	HBCount         int                             `gorm:"type:int(10);default:0;comment:红包个数" json:"hb_count"`
	RemainingCount  int                             `gorm:"type:int(10);default:0;comment:剩余个数" json:"remaining_count"`
	SpecUserId      int64                           `gorm:"type:bigint;default:0;comment:一对一红包用户ID" json:"spec_user_id"`
	SpecUserName    string                          `gorm:"type:varchar(100);default:'';comment:一对一用户名称" json:"spec_user_name"`
	HBDetail        myjson.JsonObject[[]HBUserInfo] `gorm:"type:json;comment:红包领取详情" json:"hb_detail"`
	MessageID       int                             `gorm:"type:int(12);default:0;comment:telegram message ID" json:"message_id"`
	AddTime         int64                           `gorm:"type:bigint" json:"add_time" `
}

红包表定义

func (*RedEnveloper) FormatMessage added in v1.1.18

func (self *RedEnveloper) FormatMessage() string

func (*RedEnveloper) TableName added in v1.1.18

func (self *RedEnveloper) TableName() string

type Role

type Role struct {
	Id          int64                             `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" ` //是否可空:NO
	Name        string                            `gorm:"type:varchar(100);uniqueIndex:name;comment:角色名称" json:"name"`
	Description string                            `gorm:"type:varchar(200);not null;default:'';comment:角色描述" json:"description"` // 角色描述
	ListMenus   myjson.JsonObject[map[int64]bool] `gorm:"type:json" json:"list_menus"`
	CreateTime  int64                             `gorm:"type:bigint" json:"create_time" ` //是否可空:NO
}

系统角色

func (*Role) TableName

func (self *Role) TableName() string

type SysEventLog

type SysEventLog struct {
	Id          int64  `gorm:"type:bigint(20) auto_increment;primary_key;comment:" json:"id"`
	Module      string `gorm:"type:varchar(100)" json:"module" `
	SubModule   string `gorm:"type:varchar(100)" json:"sub_module" `
	JobNo       string `gorm:"type:varchar(100)" json:"job_no" `
	Description string `gorm:"type:varchar(100)" json:"description" `
	AddTime     int64  `gorm:"type:bigint" json:"add_time" `
	ActionBy    string `gorm:"type:varchar(100)" json:"action_by" `
}

func (*SysEventLog) TableName

func (self *SysEventLog) TableName() string

type SysException

type SysException struct {
	Id        int64  `gorm:"type:bigint(20) auto_increment;primary_key;comment:" json:"id"`
	ExcTitle  string `gorm:"type:varchar(500)" json:"exc_title" `
	ExcDesc   string `gorm:"type:varchar(2000)" json:"exc_desc" `
	ExcMethod string `gorm:"type:varchar(200)" json:"exc_method" `
	ExcModule string `gorm:"type:varchar(200)" json:"exc_module" `
	AddTime   int64  `gorm:"type:bigint" json:"add_time" `
}

func (*SysException) TableName

func (self *SysException) TableName() string

type User added in v1.0.7

type User struct {
	TgUserId           int64   `gorm:"type:bigint;primary_key:tg_user_id" json:"tg_user_id"`
	UserName           string  `gorm:"type:varchar(100);default:''" json:"user_name"`
	FirstName          string  `gorm:"type:varchar(100);default:''" json:"first_name"`
	LastName           string  `gorm:"type:varchar(100);default:''" json:"last_name"`
	RechargeTrcUsdt    string  `gorm:"type:varchar(100);uniqueIndex:recharge_trc_usdt;comment:充值TRC 地址;not null" json:"recharge_trc_usdt"`
	Money              float64 `gorm:"type:double;default:0;comment:充入的余额,单位U" json:"money"`  //是否可空:NO
	TRXMoney           float64 `gorm:"type:double;default:0;comment:充入的trx" json:"trx_money"` //是否可空:NO
	FrozenMoney        float64 `gorm:"type:double;default:0" json:"frozen_money" `            //是否可空:NO
	DailyWithdrawLimit float64 `gorm:"type:double;default:100" json:"daily_withdraw_limit" `  //是否可空:NO
	CreateTime         int64   `gorm:"type:bigint;default:0" json:"create_time" `             //是否可空:NO
}

tg user info

func (*User) DisplayName added in v1.0.7

func (self *User) DisplayName() string

func (*User) GetNickname added in v1.1.12

func (self *User) GetNickname() string

func (*User) GetUsername added in v1.1.12

func (self *User) GetUsername() string

func (*User) TableName added in v1.0.7

func (self *User) TableName() string

type UserWithdraw added in v1.0.7

type UserWithdraw struct {
	Id            int64   `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" `             //是否可空:NO
	RelatedPayId  int64   `gorm:"type:bigint;default:0;index;comment:对应的支付平台提现ID" json:"related_pay_id" ` //是否可空:NO
	TgUserId      int64   `gorm:"type:bigint;comment:user id" json:"tg_user_id" `                         //是否可空:NO
	TrcUsdt       string  `gorm:"type:varchar(60);comment:提现地址" json:"trc_usdt"`
	WithdrawMoney float64 `gorm:"type:double;comment:提现金额" json:"withdraw_money"` //是否可空:NO
	HandlingFee   float64 `gorm:"type:double;comment:提现手续费用" json:"handling_fee"` //是否可空:NO
	Status        int     `gorm:"type:tinyint(4);comment:提现状态" json:"status" `    //是否可空:NO 1 request 2 finished 3 rejected
	AddTime       int64   `gorm:"type:bigint;comment:提现时间" json:"add_time" `      //是否可空:NO
	ConfirmTime   int64   `gorm:"type:bigint;comment:到帐时间" json:"confirm_time" `  //是否可空:NO
	//ConfirmMoney  float64 `gorm:"type:double;comment:到帐金额" json:"confirm_money" ` //是否可空:NO withdraw request money will not be same with confirm money
	Remark string `gorm:"type:varchar(1000);comment:审核说明" json:"remark"`
}

func (*UserWithdraw) TableName added in v1.0.7

func (self *UserWithdraw) TableName() string

type VerUpgrade added in v1.1.24

type VerUpgrade struct {
	Id      int64  `gorm:"type:bigint;auto_increment;primary_key;not null" json:"id" ` //是否可空:NO
	OsType  string `gorm:"type:varchar(50);comment:os 类别" json:"os_type"`
	Status  int    `gorm:"type:tinyint(4);default:2;comment:1:启用 2:停用" json:"status" ` //
	AddTime int64  `gorm:"type:bigint;comment:发布时间" json:"add_time" `                  //是否可空:NO
	Version string `gorm:"type:varchar(20);default:'';comment:版本号" json:"version"`
	URL     string `gorm:"type:varchar(1000);default:'';comment:下载地址" json:"url"`
	Remark  string `gorm:"type:varchar(1000);comment:审核说明" json:"remark"`
}

版本升级管理

func (*VerUpgrade) TableName added in v1.1.24

func (self *VerUpgrade) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL