models

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	Id        uint64     `gorm:"primary_key" xorm:"pk autoincr"`
	CreatedAt time.Time  `gorm:"type:timestamp(6)" xorm:"created"`
	UpdatedAt time.Time  `gorm:"type:timestamp(6)" xorm:"updated"`
	DeletedAt *time.Time `gorm:"type:timestamp(6)" xorm:"deleted" sql:"index"`
}

type BxModel

type BxModel struct {
	Id        uint64    `gorm:"primary_key" xorm:"pk autoincr"`
	CreatedAt time.Time `gorm:"type:timestamp(6)" xorm:"created"`
	UpdatedAt time.Time `gorm:"type:timestamp(6)" xorm:"updated"`
}

type Circle

type Circle struct {
	BaseModel
	Pid     uint64 `gorm:"not null;default:0" xorm:"bigint notnull default 0"`
	UserId  uint64 `gorm:"not null;default:0" xorm:"bigint notnull default 0"`
	Header  string `gorm:"null;type:varchar(128)" xorm:"varchar(128) null"`
	Title   string `gorm:"null;type:varchar(128)" xorm:"varchar(128) null"`
	Content string `gorm:"null;type:text" xorm:"text null"`
	Footer  string `gorm:"null;type:text" xorm:"text null"`
	HeadUrl string `gorm:"null;type:text" xorm:"text null"`
	Remarks string `gorm:"null;type:text" xorm:"text null"`
}

func (*Circle) FromProto

func (r *Circle) FromProto(pb *v10.Circle) *Circle

func (Circle) TableName

func (Circle) TableName() string

func (*Circle) ToProto

func (r *Circle) ToProto() (ret *v10.Circle)

type CircleImage

type CircleImage struct {
	BaseModel
	CircleId  uint64 `gorm:"not null;default:0;column:cid" xorm:"bigint notnull default 0 'cid'"`
	UserId    uint64 `gorm:"not null;default:0;column:uid" xorm:"bigint notnull default 0 'uid'"`
	BaseName  string `gorm:"null;type:text" xorm:"text null"`
	Mime      string `gorm:"null;type:text" xorm:"text null"`
	Size      int64  `gorm:"not null;default:0" xorm:"bigint notnull default 0"`
	LocalPath string `gorm:"null;type:text" xorm:"text null"`
	Url       string `gorm:"null;type:text" xorm:"text null"`
}

func (CircleImage) TableName

func (CircleImage) TableName() string

Jump to

Keyboard shortcuts

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