model

package
v0.0.0-...-0623bdb Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertInitial

func InsertInitial(db *gorm.DB) error

出入初始化数据

Types

type GetPasswordRecordsStatus

type GetPasswordRecordsStatus int
const (
	// 未知错误
	Unknown GetPasswordRecordsStatus = iota
	// 处理成功
	Success
	// 已拒绝
	Refused
	// 记录不存在
	NotFound
)

type TGetPasswordRecords

type TGetPasswordRecords struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	// 请求者id
	UserId string `gorm:"index;not null;comment:用户id"`
	// 密码记录id
	PasswordId   string        `gorm:"not null;comment:密码记录id"`
	PasswordInfo TPasswordInfo `gorm:"foreignKey:PasswordId;references:ID"`
	// 请求状态
	Status GetPasswordRecordsStatus `gorm:"not null;comment:请求状态"`
	// ip地址
	IP string `gorm:"not null;comment:ip地址"`
}

func (*TGetPasswordRecords) TableName

func (T *TGetPasswordRecords) TableName() string

type TPasswordInfo

type TPasswordInfo struct {
	gorm.Model

	// 密码记录id
	ID string `gorm:"uniqueIndex;not null"`
	// 创建者id
	UserId string `gorm:"primaryKey;not null;comment:用户id"`

	// 应用名称
	AppName string `gorm:"primaryKey;comment:应用名称"`

	// 账户类型,一个账户可以有多种类型
	AccountType string `gorm:"primaryKey;comment:账户类型,一个账户可以有多种类型"`

	// 账户
	Account string `gorm:"primaryKey;comment:账户"`

	// 密码
	Password string `gorm:"comment:密码"`

	// url
	Url string `gorm:"default:'';comment:url"`

	// 密码强度
	PasswordStrength checkpassword.PasswordStrength `gorm:"comment:密码强度"`

	// 备注
	Notes string `gorm:"comment:备注"`
}

func (*TPasswordInfo) TableName

func (T *TPasswordInfo) TableName() string

type TSm2Info

type TSm2Info struct {
	gorm.Model
	PublicKey  string `gorm:"not null;comment:公钥"`
	PrivateKey string `gorm:"not null;comment:私钥"`
}

func (*TSm2Info) TableName

func (T *TSm2Info) TableName() string

Jump to

Keyboard shortcuts

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