database

package
v0.0.0-...-47c01e7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package database, store user handler information here, also user can register for storing data here.

Index

Constants

This section is empty.

Variables

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.

func (SliceString) Value

func (t SliceString) Value() (driver.Value, error)

Value 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.

Jump to

Keyboard shortcuts

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