schema

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Id        int64              `xorm:"id BIGINT(20) notnull pk" db:"id" bson:"-" json:"bn_id,omitempty"`
	IdStr     string             `xorm:"-" db:"-" bson:"-" json:"id,omitempty"`
	ID_       primitive.ObjectID `xorm:"-" db:"-" bson:"_id,omitempty" json:"_id,omitempty"`
	Key       string             `xorm:"code CHAR(10) notnull default '' index" db:"-" bson:"k,omitempty" json:"k"`
	Url       string             `xorm:"url VARCHAR(255) notnull default ''" db:"-" bson:"u,omitempty" json:"u"`
	Hash      string             `xorm:"hash CHAR(32) notnull default '' index" db:"-" bson:"h,omitempty" json:"h"`
	Project   string             `xorm:"project CHAR(20) notnull default '' index" db:"-" bson:"p,omitempty" json:"p"`
	IP        string             `xorm:"ip CHAR(49) notnull default ''" db:"-" bson:"ip,omitempty" json:"ip"`
	CreatedAt int64              `xorm:"created_at BIGINT(20) notnull default 0" db:"created_at" bson:"c,omitempty" json:"c,omitempty"`
	DeletedAt int64              `xorm:"deleted_at BIGINT(20) notnull default 0" db:"deleted_at" bson:"-" json:"deleted,omitempty"`
	UpdatedAt int64              `xorm:"updated_at BIGINT(20) notnull default 0" db:"updated_at" bson:"-" json:"updated,omitempty"`
}

func (*Link) BeforeInsert

func (p *Link) BeforeInsert()

func (*Link) BeforeUpdate

func (p *Link) BeforeUpdate()

func (*Link) CollectionName

func (p *Link) CollectionName(ctx context.Context) string

func (*Link) ConvertIdsToStr

func (p *Link) ConvertIdsToStr()

func (*Link) TableName

func (p *Link) TableName(ctx context.Context) string

func (*Link) ToMongoDocument

func (p *Link) ToMongoDocument() bson.D

func (*Link) ToStruct

func (p *Link) ToStruct(rs bson.D) (err error)

Jump to

Keyboard shortcuts

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