account

package
v0.0.0-...-30dbe51 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tables = []interface{}{&Account{}}

Functions

func New

func New(
	c *config.Config,
	logger *zap.Logger,
	httpServer *http.Server,
) (*application.Application, error)

New returns a new account application.

Types

type Account

type Account struct {
	metav1.ObjectMeta

	// Required: true
	Username string `json:"username" gorm:"type:varchar(127);not null;uniqueIndex:udx_username;comment:用户名"`

	// Required: true
	Email string `json:"email" gorm:"type:varchar(127);not null;uniqueIndex:udx_email;comment:邮箱"`

	// Required: true
	Password string `json:"-" gorm:"type:varchar(255);not null;comment:密码"`

	// Required: true
	DeletedAt soft_delete.DeletedAt `json:"-" gorm:"column:delete_time;not null;uniqueIndex:udx_username;uniqueIndex:udx_email;comment:删除时间"`
}

Account represents a account restful resource.

func (*Account) BeforeCreate

func (a *Account) BeforeCreate(tx *gorm.DB) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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