models

package
v0.0.0-...-91ffa7f Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelAppKey

type ModelAppKey struct {
	AppKeyId     string    `gorm:"type:varchar(64);PRIMARY_KEY" json:"key_id"`
	Key          string    `gorm:"unique;type:varchar(32);" json:"email"`
	Name         string    `gorm:"type:varchar(64);" json:"name"`
	Status       string    `gorm:"type:varchar(10);" json:"status" sql:"DEFAULT:'active'"`
	GeneratedKey string    `json:"generated_key"`
	LastAccess   time.Time `json:"last_access"`
	CreatedBy    int       `json:"created_by"`
	UpdatedBy    int       `json:"updated_by"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	DeletedAt    time.Time `json:"deleted_at"`
}

func (ModelAppKey) TableName

func (ModelAppKey) TableName() string

change table name

type ModelAppSession

type ModelAppSession struct {
	AppSessionId int       `gorm:"AUTO_INCREMENT;PRIMARY_KEY" json:"app_session_id"`
	AppKeyId     string    `gorm:"type:varchar(64);" `
	UserId       int       `json:"user_id"`
	UserAgent    string    `json:"user_agent"`
	Status       string    `gorm:"type:varchar(10);" json:"status" sql:"DEFAULT:'active'"`
	AccessToken  string    `json:"access_token"`
	LastAccess   time.Time `json:"last_access"`
	CreatedBy    int       `json:"created_by"`
	CreatedAt    time.Time `json:"created_at"`
	DeletedAt    time.Time `json:"deleted_at"`
	ExpiredAt    time.Time `json:"expired_at"`
}

func (ModelAppSession) TableName

func (ModelAppSession) TableName() string

change table name

type ModelAppUser

type ModelAppUser struct {
	AppUserId    int       `gorm:"AUTO_INCREMENT;PRIMARY_KEY;COLUMN:app_user_id"  json:"user_id"`
	Username     string    `gorm:"unique;type:varchar(32);" json:"username"`
	AuthKey      string    `json:"auth_key"`
	PasswordHash string    `json:"password"`
	Email        string    `gorm:"unique;type:varchar(64);" json:"email"`
	Status       string    `gorm:"type:varchar(10);" json:"status" sql:"DEFAULT:'active'"`
	CreatedBy    int       `json:"created_by"`
	UpdatedBy    int       `json:"updated_by"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	DeletedAt    time.Time `json:"deleted_at"`
}

func (ModelAppUser) TableName

func (ModelAppUser) TableName() string

change table name

Jump to

Keyboard shortcuts

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