model

package
v1.2.2-beta6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirstCategory

type FirstCategory struct {
	gorm.Model
	FirstCategoryIndex       int64  `gorm:"column:first_category_index"`
	FirstCategoryName        string `gorm:"column:first_category_name"`
	FirstCategoryUid         string `gorm:"column:first_category_uid"`
	FirstCategoryDescription string `gorm:"column:first_category_description;type:varchar(1024)"`
	FirstCategoryIconPath    string `gorm:"column:first_category_icon_path"`
}

FirstCategory 第一品类

func (FirstCategory) TableName

func (FirstCategory) TableName() string

type SecondCategory

type SecondCategory struct {
	gorm.Model
	SecondCategoryIndex       int64  `gorm:"column:second_category_index"`
	FirstCategoryUid          string `gorm:"column:first_category_uid;association_foreignkey:first_category_uid"`
	SecondCategoryName        string `gorm:"column:second_category_name"`
	SecondCategoryAuthor      string `gorm:"column:second_category_author"`
	SecondCategoryDescription string `gorm:"column:second_category_description"`
}

SecondCategory 第二品类

func (SecondCategory) TableName

func (SecondCategory) TableName() string

type ThirdCategory

type ThirdCategory struct {
	gorm.Model
	ThirdCategoryIndex       int64  `gorm:"column:third_category_index"`
	SecondCategoryIndex      int64  `gorm:"column:second_category_index"`
	FirstCategoryUid         string `gorm:"column:first_category_uid"`
	ThirdCategoryName        string `gorm:"column:third_category_name"`
	ThirdCategoryPath        string `gorm:"column:third_category_path"`
	ThirdCategoryAuthor      string `gorm:"column:third_category_author"`
	ThirdCategoryDescription string `gorm:"column:third_category_description"`
}

ThirdCategory 第三品类

func (ThirdCategory) TableName

func (ThirdCategory) TableName() string

type VtbDB

type VtbDB gorm.DB

func Initialize

func Initialize(dbpath string) *VtbDB

func Open

func Open(dbpath string) (*VtbDB, error)

func (*VtbDB) Close

func (vdb *VtbDB) Close() error

func (*VtbDB) GetAllFirstCategoryMessage

func (vdb *VtbDB) GetAllFirstCategoryMessage() string

GetAllFirstCategoryMessage 取出所有vtb

func (*VtbDB) GetAllSecondCategoryMessageByFirstIndex

func (vdb *VtbDB) GetAllSecondCategoryMessageByFirstIndex(firstIndex int) string

GetAllSecondCategoryMessageByFirstIndex 取得同一个vtb所有语录类别

func (*VtbDB) GetAllThirdCategoryMessageByFirstIndexAndSecondIndex

func (vdb *VtbDB) GetAllThirdCategoryMessageByFirstIndexAndSecondIndex(firstIndex, secondIndex int) string

GetAllThirdCategoryMessageByFirstIndexAndSecondIndex 取得同一个vtb同个类别的所有语录

func (*VtbDB) GetFirstCategoryByFirstUid

func (vdb *VtbDB) GetFirstCategoryByFirstUid(firstUid string) FirstCategory

func (*VtbDB) GetThirdCategory

func (vdb *VtbDB) GetThirdCategory(firstIndex, secondIndex, thirdIndex int) ThirdCategory

GetThirdCategory

func (*VtbDB) GetVtbList

func (vdb *VtbDB) GetVtbList() (uidList []string)

func (*VtbDB) RandomVtb

func (vdb *VtbDB) RandomVtb() ThirdCategory

func (*VtbDB) StoreVtb

func (vdb *VtbDB) StoreVtb(uid string)

Jump to

Keyboard shortcuts

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