Documentation
¶
Overview ¶
Package database, store user handler information here, also user can register for storing data here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB gorm.DB
Functions ¶
func SaveInformation ¶
func SaveInformation(b *HaruiBot.BotInstance, updater tgbotapi.Update)
Types ¶
type SliceString ¶
type SliceString []string
SliceString GORM NOT SUPPORT SLICE, so custom.
func (*SliceString) Scan ¶
func (t *SliceString) Scan(value interface{}) error
Scan SLiceString Default Scanner / Receiver.
type UserModel ¶
type UserModel struct {
gorm.Model
UserID int64 `gorm:"primaryKey;<-:create"` // userid cannot change.
Username string // username may not exist yet, maybe more than one,
// but no one sure if @username is the really only one.
FullName string // User Full name + LastName + FirstName.
FromChannel SliceString // what you are active in bot's service.
UserPhoto string // userPhoto shown as a file id, no required to save a raw file, get it from Telegram Official.
}
UserModel UserModel-Only User can be added into, not accept channel user.
Click to show internal directories.
Click to hide internal directories.