db

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindUID

func BindUID(sdkId, pid int32, openId string) (int64, bool)

BindUID 绑定UID

func DevAccountRegister

func DevAccountRegister(accountName, password, ip string) int32

func GetUID

func GetUID(pid int32, openId string) (int64, bool)

Types

type Component

type Component struct {
	cherryFacade.Component
}

func New

func New() *Component

func (*Component) Init

func (c *Component) Init()

Init 组件初始化函数 为了简化部署的复杂性,本示例取消了数据库连接相关的逻辑

func (*Component) Name

func (c *Component) Name() string

func (*Component) OnAfterInit

func (c *Component) OnAfterInit()

func (*Component) OnStop

func (*Component) OnStop()

type DevAccountTable

type DevAccountTable struct {
	AccountId   int64  `gorm:"column:account_id;primary_key;comment:'帐号id'" json:"accountId"`
	AccountName string `gorm:"column:account_name;comment:'帐号名'" json:"accountName"`
	Password    string `gorm:"column:password;comment:'密码'" json:"-"`
	CreateIP    string `gorm:"column:create_ip;comment:'创建ip'" json:"createIP"`
	CreateTime  int64  `gorm:"column:create_time;comment:'创建时间'" json:"createTime"`
}

DevAccountTable 开发模式的帐号信息表(platform.TypeDevMode)

func DevAccountWithName

func DevAccountWithName(accountName string) (*DevAccountTable, error)

func (*DevAccountTable) TableName

func (*DevAccountTable) TableName() string

type UserBindTable

type UserBindTable struct {
	UID      int64  `gorm:"column:uid;primary_key;comment:'用户唯一id'" json:"uid"`
	SdkId    int32  `gorm:"column:sdk_id;comment:'sdk id'" json:"sdkId"`
	PID      int32  `gorm:"column:pid;comment:'平台id'" json:"pid"`
	OpenId   string `gorm:"column:open_id;comment:'平台帐号open_id'" json:"openId"`
	BindTime int64  `gorm:"column:bind_time;comment:'绑定时间'" json:"bindTime"`
}

UserBindTable uid绑定第三方平台表

func (*UserBindTable) TableName

func (*UserBindTable) TableName() string

Jump to

Keyboard shortcuts

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