generalModels

package
v0.0.0-...-6875e1c Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BestdoriFanMadeVersion = 1

Functions

This section is empty.

Types

type Author

type Author struct {
	Username string `json:"username"` // 谱面作者用户名
	Nickname string `json:"nickname"` // 谱面作者昵称
}

type BestdoriAuthorList

type BestdoriAuthorList struct {
	UserName string `db:"username"`
	NickName string `db:"nickname"`
}

type BestdoriChartItem

type BestdoriChartItem struct {
	ChartID int    `json:"id"`      // Bestdori的谱面ID
	Title   string `json:"title"`   // 谱面的标题
	Artists string `json:"artists"` // 谱面的艺术家
	Author  Author `json:"author"`
	Diff    int    `json:"diff"` // 0-4 Easy-Special
	Level   int    `json:"level"`
	SongUrl struct {
		Cover string `json:"cover"`
		Audio string `json:"audio"`
	} `json:"song_url"` // 谱面资源
	Likes               int                 `json:"likes,omitempty"` // 喜爱数
	PostTime            uint64              `json:"time,omitempty"`  // 时间戳
	LastUpdateTime      time.Time           `json:"last_update"`
	Content             string              `json:"content"`
	Chart               pkg.BestdoriV2Chart `json:"chart,omitempty"` // 谱面
	pkg.MapMetricsBasic                     // 一些易得的谱面数据 用于某些项
}

type BestdoriChartUpdateItem

type BestdoriChartUpdateItem struct {
	ChartID  int    `json:"chart_id"`
	Username string `json:"username"`
	Nickname string `json:"nickname"`
	Diff     int    `json:"diff"`
	Level    int    `json:"chart_level"`
	Likes    int    `json:"likes"`
}

type BestdoriFanMade

type BestdoriFanMade struct {
	ChartID    int       `db:"chartID"`
	Title      string    `db:"title"`
	Artists    string    `db:"artists"`
	Author     string    `db:"author"`
	Diff       int       `db:"diff"`
	ChartLevel int       `db:"chartLevel"`
	CoverURL   string    `db:"coverURL"`
	SongURL    string    `db:"songURL"`
	Likes      string    `db:"likes"`
	PostTime   uint64    `db:"postTime"`
	LastUpdate time.Time `db:"lastUpdate"`
	Content    string    `db:"content"`
}

type BestdoriFanMadeMetrics

type BestdoriFanMadeMetrics struct {
	ChartID   int     `db:"chartID"`
	TotalNote int     `db:"totalNote"`
	TotalTime float64 `db:"totalTime"`
	SPRhythm  bool    `db:"SPRhythm"`
	Irregular bool    `db:"irregular"`
	Version   int     `db:"version"`
}

type BestdoriFanMadeView

type BestdoriFanMadeView struct {
	ChartID    int       `db:"chartID" json:"chart_id"`
	Title      string    `db:"title" json:"title"`
	Artists    string    `db:"artists" json:"artists"`
	Username   string    `db:"author" json:"username"`
	Nickname   string    `db:"nickname" json:"nickname"`
	Diff       int       `db:"diff" json:"diff"`
	ChartLevel int       `db:"chartLevel" json:"chart_level"`
	CoverURL   string    `db:"coverURL" json:"cover_url"`
	SongURL    string    `db:"songURL" json:"song_url"`
	Likes      int       `db:"likes" json:"likes"`
	PostTime   uint64    `db:"postTime" json:"post_time"`
	LastUpdate time.Time `db:"lastUpdate" json:"last_update"`
	TotalNote  int       `db:"totalNote" json:"total_note"`
	TotalTime  float64   `db:"totalTime" json:"total_time"`
	TotalNPS   float64   `db:"totalNPS" json:"total_nps"`
	SPRhythm   bool      `db:"SPRhythm" json:"sp_rhythm"`
	Irregular  int       `db:"irregular" json:"irregular"`
	Content    string    `db:"content" json:"content"`
	Version    int       `db:"version" json:"-"`
}

BestdoriFanMadeView also a map for meiliSearch item

func (BestdoriFanMadeView) ToBestdoriChart

func (d BestdoriFanMadeView) ToBestdoriChart() BestdoriChartItem

Jump to

Keyboard shortcuts

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