Documentation ¶
Overview ¶
Package model vtb数据库操作
Index ¶
- type FirstCategory
- type SecondCategory
- type ThirdCategory
- type VtbDB
- func (vdb *VtbDB) Close() error
- func (vdb *VtbDB) GetAllFirstCategoryMessage() (string, error)
- func (vdb *VtbDB) GetAllSecondCategoryMessageByFirstIndex(firstIndex int) (string, error)
- func (vdb *VtbDB) GetAllThirdCategoryMessageByFirstIndexAndSecondIndex(firstIndex, secondIndex int) (string, error)
- func (vdb *VtbDB) GetFirstCategoryByFirstUID(firstUID string) FirstCategory
- func (vdb *VtbDB) GetThirdCategory(firstIndex, secondIndex, thirdIndex int) ThirdCategory
- func (vdb *VtbDB) GetVtbList() (uidList []string, err error)
- func (vdb *VtbDB) RandomVtb() ThirdCategory
- func (vdb *VtbDB) StoreVtb(uid string) (err error)
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 第一品类
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 第二品类
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 第三品类
type VtbDB ¶
VtbDB vtb 数据库
func (*VtbDB) GetAllFirstCategoryMessage ¶
GetAllFirstCategoryMessage 取出所有vtb
func (*VtbDB) GetAllSecondCategoryMessageByFirstIndex ¶
GetAllSecondCategoryMessageByFirstIndex 取得同一个vtb所有语录类别
func (*VtbDB) GetAllThirdCategoryMessageByFirstIndexAndSecondIndex ¶
func (vdb *VtbDB) GetAllThirdCategoryMessageByFirstIndexAndSecondIndex(firstIndex, secondIndex int) (string, error)
GetAllThirdCategoryMessageByFirstIndexAndSecondIndex 取得同一个vtb同个类别的所有语录
func (*VtbDB) GetFirstCategoryByFirstUID ¶
func (vdb *VtbDB) GetFirstCategoryByFirstUID(firstUID string) FirstCategory
GetFirstCategoryByFirstUID ...
func (*VtbDB) GetThirdCategory ¶
func (vdb *VtbDB) GetThirdCategory(firstIndex, secondIndex, thirdIndex int) ThirdCategory
GetThirdCategory ...
func (*VtbDB) GetVtbList ¶
GetVtbList ...
Click to show internal directories.
Click to hide internal directories.