entity

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 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 BaseEntity

type BaseEntity struct {
	CreatedBy string         `json:"createdBy,omitempty" gorm:"column:sys_created_by;size:255" `
	CreatedAt *time.Time     `json:"createdAt,omitempty" gorm:"column:sys_created_at" sql:"index"`
	UpdatedBy string         `json:"updatedBy,omitempty" gorm:"column:sys_updated_by;size:255"`
	UpdatedAt *time.Time     `json:"updatedAt,omitempty" gorm:"column:sys_updated_at" sql:"index"`
	DeletedBy string         `json:"deletedBy,omitempty" gorm:"column:sys_deleted_by;size:255"`
	DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"column:deleted_at;index:idx_delete_at" sql:"index"`
}

BaseEntity base type

type SysUser

type SysUser struct {
	ID uint64 `json:"ID" gorm:"primary_key;column:id"`

	UUID      string `json:"uuid" gorm:"column:uuid;size:255;unique;not null" sql:"index"`
	Username  string `json:"userName" gorm:"column:username;size:255;unique;not null" sql:"index"`
	Password  string `json:"-" gorm:"column:password;size:255;not null;index" sql:"index"`
	NickName  string `json:"nickName" gorm:"column:nick_name;size:255;not null"`
	Email     string `json:"email" gorm:"column:email;size:255;unique;not null" sql:"index"`
	HeaderImg string `json:"headerImg" gorm:"column:header_img;size:255"`
	IsActive  bool   `json:"isActive" gorm:"column:is_active;index" sql:"index"`

	// Authority   SysAuthority `json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId;"`
	AuthorityID string `json:"authorityId" gorm:"column:authority_id;size:255;not null;index" sql:"index"`

	BaseEntity
}

SysUser type

func (SysUser) TableName

func (t SysUser) TableName() string

TableName get real database table name

type SysUserClientApps

type SysUserClientApps struct {
	ID uint64 `gorm:"primary_key;column:id"`

	UUID          string `json:"uuid" gorm:"column:uuid;size:255;unique;not null" sql:"index"`
	ClientAppCode string `json:"clientAppCode" gorm:"column:client_app_code;size:255;not null;unique" sql:"index"`
	ClientAppName string `json:"clientAppName" gorm:"column:client_app_name;size:255;not null"`
	ClientAppDesc string `json:"ClientAppDesc" gorm:"column:client_app_desc;size:255;"`
	ClientKey     string `json:"clientKey" gorm:"column:client_key;size:255;" sql:"index"`
	SecretKey     string `json:"secretKey" gorm:"column:secret_key;size:500;" sql:"index"`
	IsActive      bool   `json:"isActive" gorm:"column:is_active;index" sql:"index"`

	User   SysUser `json:"user" gorm:"ForeignKey:UserID;AssociationForeignKey:ID;"`
	UserID uint64  `json:"userID" gorm:"column:user_id;" sql:"index"`

	BaseEntity
}

SysUserClientApps type

func (SysUserClientApps) TableName

func (t SysUserClientApps) TableName() string

TableName get real database table name

type TmpUserRegistration

type TmpUserRegistration struct {
	ID uint64 `json:"ID" gorm:"primary_key;column:id"`

	UUID     string `json:"uuid" gorm:"column:uuid;size:255;unique;not null" sql:"index"`
	Username string `json:"userName" gorm:"column:username;size:255;unique;not null" sql:"index"`
	Password string `json:"-" gorm:"column:password;size:255;not null" sql:"index"`
	NickName string `json:"nickName" gorm:"column:nick_name;size:255;not null"`
	Email    string `json:"email" gorm:"column:email;size:255;unique;not null;" sql:"index"`

	IsActivated    bool       `json:"isActivated" gorm:"column:is_activated;index" sql:"index"`
	ActivationCode string     `json:"activationCode" gorm:"column:activation_code;size:255" sql:"index"`
	ActivatedAt    *time.Time `json:"activateddAt,omitempty" gorm:"column:sys_activated_at" sql:"index"`

	BaseEntity
}

TmpUserRegistration type

func (TmpUserRegistration) TableName

func (t TmpUserRegistration) TableName() string

TableName get real database table name

Jump to

Keyboard shortcuts

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