db

package
v0.0.0-...-0e80e98 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	ID        string `json:"id"`         // 记录 ID
	UID       string `json:"uid"`        // 用户 ID
	GachaType string `json:"gacha_type"` // 卡池类型
	Name      string `json:"name"`       // 物品名称
	ItemID    string `json:"item_id"`    // 物品 ID
	ItemType  string `json:"item_type"`  // 物品类型
	RankType  string `json:"rank_type"`  // 稀有度
	Count     string `json:"count"`      // 物品数量
	Time      string `json:"time"`       // 时间
	Lang      string `json:"lang"`       // 语言
}

Log 表示抽卡记录

type LogsDB

type LogsDB struct {
	// contains filtered or unexported fields
}

func NewLogsDB

func NewLogsDB(path string) (LogsDB, error)

func (LogsDB) ImportFromJSON

func (l LogsDB) ImportFromJSON(filename string) error

func (LogsDB) InitDB

func (l LogsDB) InitDB()

func (LogsDB) Insert

func (l LogsDB) Insert(logs ...gacha.Log) error

func (LogsDB) Pity

func (l LogsDB) Pity()

func (LogsDB) UIDList

func (l LogsDB) UIDList() ([]string, error)

func (LogsDB) UpdateFromURL

func (l LogsDB) UpdateFromURL()

type Pity

type Pity struct {
	UID       string `json:"uid"`
	GachaType string `json:"gacha_type"`
	Pity      int
}

Jump to

Keyboard shortcuts

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