db

package
v0.0.0-...-276be26 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func GetBackend

func GetBackend() dbi.DbBackend

func GetCurrentBackendString

func GetCurrentBackendString() string

func GetCurrentEnvString

func GetCurrentEnvString() string

func GetDbConfig

func GetDbConfig() *dbi.Config

func GetDbConfigItem

func GetDbConfigItem() *dbi.ConfigItem

func GetSession

func GetSession()

func Init

func Init(e *echo.Echo) *dbi.Config

Types

type MxModel

type MxModel interface {
	Init()
}

type Users2

type Users2 struct {
	// ID          gocql.UUID    `json:"id" cql:"id" bson:"_id,omitempty" default.cql:"uuid()"`
	Name        string    `json:"username" cql:"username" bson:"username"` // unique
	Email       string    `json:"email" cql:"email" bson:"email"`          // unique
	Mobile      string    `json:"mobile" cql:"mobile" bson:"mobile"`       // unique
	Password    string    `json:"password,omitempty" cql:"password" bson:"password" before:"bcrypt"`
	CreatedTime time.Time `json:"time_created" cql:"time_created" bson:"time_created" default.cql:"toTimestamp(now())"`
	UpdatedTime time.Time `json:"time_updated" cql:"time_updated" bson:"time_updated" default.cql:"toTimestamp(now())"`
	Token       string    `json:"token1,omitempty" cql:"token1" bson:"-"`
	Followers   []string  `json:"followers,omitempty" cql:"followers" bson:"followers,omitempty"`

	Blocked   bool `json:"blocked" cql:"s_blocked" bson:"email"`     // 临时禁用,管理员操作时
	Forbidden bool `json:"forbidden" cql:"s_forbidden" bson:"email"` // 自动规则所永久禁用
	Deleted   bool `json:"deleted" cql:"s_deleted" bson:"email"`     // 已经销户
}

func (Users2) Init

func (s Users2) Init()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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