entity

package
Version: v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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"`
	UpdatedBy string         `json:"updatedBy,omitempty" gorm:"column:sys_updated_by;size:255"`
	UpdatedAt *time.Time     `json:"updatedAt,omitempty" gorm:"column:sys_updated_at"`
	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"`
}

BaseEntity represent Base Entity

type SysUserClientAppsEntity

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

	UUID          string `json:"uuid" gorm:"column:uuid;size:255;unique;not null"`
	ClientAppCode string `json:"clientAppCode" gorm:"column:client_app_code;size:255;not null;unique"`
	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;"`
	SecretKey     string `json:"secretKey" gorm:"column:secret_key;size:500;"`
	IsActive      bool   `json:"isActive" gorm:"column:is_active;index"`

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

	BaseEntity
}

SysUserClientAppsEntity represent SysUserClientApps Entity

func (*SysUserClientAppsEntity) TableName

func (t *SysUserClientAppsEntity) TableName() string

TableName get real database table name

type SysUserEntity

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

	UUID      string `json:"uuid" gorm:"column:uuid;size:255;unique;not null"`
	Username  string `json:"userName" gorm:"column:username;size:255;unique;not null"`
	Password  string `json:"-" gorm:"column:password;size:255;not null;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"`
	HeaderImg string `json:"headerImg" gorm:"column:header_img;size:255"`
	IsActive  bool   `json:"isActive" gorm:"column:is_active;index"`

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

	BaseEntity
}

SysUserEntity represent SysUser Entity

func (*SysUserEntity) TableName

func (t *SysUserEntity) TableName() string

TableName get real database table name

type TmpUserRegistrationEntity

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

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

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

	BaseEntity
}

TmpUserRegistrationEntity represent TmpUserRegistration Entity

func (*TmpUserRegistrationEntity) TableName

func (t *TmpUserRegistrationEntity) TableName() string

TableName get real database table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL