two

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache() *cache.Cache

func Orm

func Orm() *ripple.Orm

func Register

func Register()

Types

type BaseModel

type BaseModel struct {
	CreatedTimeStr string     `json:"createdTime" gorm:"-"`
	CreatedTime    *time.Time `json:"-" gorm:"column:created_time; type:datetime; not null; default:current_timestamp"`
	UpdatedTime    *time.Time `json:"-" gorm:"column:updated_time; type:datetime"`
	DeletedTime    *time.Time `json:"-" gorm:"column:deleted_time; type:datetime"`
	IsDeleted      int64      `json:"-" gorm:"column:is_deleted; type:tinyint(1); not null; default:0"`
}

func (*BaseModel) AfterFind

func (this *BaseModel) AfterFind(*gorm.DB) error

func (*BaseModel) DeleteCache

func (this *BaseModel) DeleteCache(key string)

func (*BaseModel) DeleteCacheByPrefix

func (this *BaseModel) DeleteCacheByPrefix(prefix string)

func (*BaseModel) GetCache

func (this *BaseModel) GetCache(cacheKey string) string

func (*BaseModel) SetCache

func (this *BaseModel) SetCache(cacheKey string, data interface{})

type BmbCity

type BmbCity struct {
	ID   int64  `json:"ID" gorm:"column:id; type:int(11); primary_key; auto_increment"`
	Name string `json:"name" gorm:"column:name; type:varchar(50); not null; default:'北京'"`
	Pid  int64  `json:"pid" gorm:"column:pid; type:tinyint(4); not null; default:1"`
	BaseModel
}

func (*BmbCity) FindCityID

func (this *BmbCity) FindCityID(id int64) (one BmbCity)

func (*BmbCity) FindCityListByPid

func (this *BmbCity) FindCityListByPid(pid int64) (list []BmbCity)

func (*BmbCity) Save

func (this *BmbCity) Save() bool

func (BmbCity) TableName

func (BmbCity) TableName() string

type User

type User struct {
	Login       string `sql:"size:255;not null"`
	Password    string `sql:"size:255;not null"`
	Email       string `sql:"size:255"`
	Avatar      string `sql:"size:255"`
	Github      string `gorm:"column:github"`
	QQ          string `gorm:"column:qq"`
	Weibo       string `gorm:"column:weibo"`
	Weixin      string `gorm:"column:weixin"`
	HomePage    string `gorm:"column:home_page"`
	Tagline     string
	Description string
	Location    string
	BaseModel
}

Jump to

Keyboard shortcuts

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