Documentation ¶
Index ¶
- Variables
- func NewBookDao() *bookDao
- func NewCategoryDao() *categoryDao
- func NewMainDao() *mainDao
- func NewPhraseDao() *phraseDao
- func NewProjectDao() *projectDao
- func NewUserDao() *userDao
- type BookModel
- type CategoryModel
- type MainModel
- type MainStaModel
- type ModelTime
- type PhraseModel
- type ProjectModel
- type UserModel
Constants ¶
This section is empty.
Variables ¶
View Source
var BookDao *bookDao
View Source
var CategoryDao *categoryDao
View Source
var MainDao *mainDao
View Source
var PhraseDao *phraseDao
View Source
var ProjectDao *projectDao
View Source
var UserDao *userDao
Functions ¶
func NewBookDao ¶
func NewBookDao() *bookDao
func NewCategoryDao ¶
func NewCategoryDao() *categoryDao
func NewMainDao ¶
func NewMainDao() *mainDao
func NewPhraseDao ¶
func NewPhraseDao() *phraseDao
func NewProjectDao ¶
func NewProjectDao() *projectDao
func NewUserDao ¶
func NewUserDao() *userDao
Types ¶
type BookModel ¶
type BookModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` UserId uint `gorm:"column:user_id;not null" json:"user_id"` CoverUrl string `gorm:"column:cover_url;not null" json:"cover_url"` Name string `gorm:"column:name;not null" json:"name"` Sort int `gorm:"column:sort;not null" json:"sort"` IsDel int `gorm:"column:is_del;not null" json:"is_del"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` }
type CategoryModel ¶
type CategoryModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` UserId uint `gorm:"column:user_id;not null" json:"user_id"` Name string `gorm:"column:name;not null" json:"name"` CType int `gorm:"column:type;not null" json:"type"` Sort int `gorm:"column:sort;not null" json:"sort"` IconUrl string `gorm:"column:icon_url;not null" json:"icon_url"` IsDel int `gorm:"column:is_del;not null" json:"is_del"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` }
func (CategoryModel) TableName ¶
func (um CategoryModel) TableName() string
type MainModel ¶
type MainModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` UserId uint `gorm:"column:user_id;not null" json:"user_id"` BookId uint `gorm:"column:book_id;not null" json:"book_id"` CategoryId uint `gorm:"column:category_id;not null" json:"category_id"` MType int `gorm:"column:type;not null" json:"type"` Money float64 `gorm:"column:money;not null" json:"money"` Name string `gorm:"column:name;not null" json:"name"` Desc string `gorm:"column:desc;not null" json:"desc"` Date ModelTime `gorm:"column:date" json:"date"` IsDel int `gorm:"column:is_del;not null" json:"is_del"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` }
type MainStaModel ¶
type MainStaModel struct { NickName string `gorm:"column:nick_name;not null" json:"nick_name"` AvatarUrl string `gorm:"column:avatar_url;not null" json:"avatar_url"` Pay float64 `gorm:"column:pay;not null" json:"pay"` Time ModelTime `gorm:"column:time" json:"time"` }
func (MainStaModel) TableName ¶
func (um MainStaModel) TableName() string
type PhraseModel ¶
type PhraseModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` Phrase string `gorm:"column:phrase;unique;not null" json:"phrase"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` }
func (PhraseModel) TableName ¶
func (um PhraseModel) TableName() string
type ProjectModel ¶
type ProjectModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` Git string `gorm:"column:git;not null" json:"git"` Image string `gorm:"column:image;not null" json:"image"` Name string `gorm:"column:name;not null" json:"name"` Content string `gorm:"column:content;not null" json:"content"` Sort int `gorm:"column:sort;not null" json:"sort"` Views int `gorm:"column:views;not null" json:"views"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` }
func (ProjectModel) TableName ¶
func (um ProjectModel) TableName() string
type UserModel ¶
type UserModel struct { ID uint `gorm:"primaryKey;column:id" json:"id"` OpenId string `gorm:"column:openid;unique;not null" json:"openid"` Token string `gorm:"column:token;not null" json:"token"` NickName string `gorm:"column:nick_name;not null" json:"nick_name"` AvatarUrl string `gorm:"column:avatar_url;not null" json:"avatar_url"` Sex int `gorm:"column:sex;not null" json:"sex"` Job string `gorm:"column:job;not null" json:"job"` CreatedAt ModelTime `gorm:"column:created_at" json:"created_at"` UpdatedAt ModelTime `gorm:"column:updated_at" json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.