model

package
v0.0.0-...-911e024 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	DB *gorm.DB
}

Repo 提供用户注册的服务

func NewRepo

func NewRepo(db *gorm.DB) *Repo

NewRepo 创建一个新的RegisterService实例

type User

type User struct {
	gorm.Model          // Includes ID, CreatedAt, UpdatedAt, DeletedAt fields
	Username     string `gorm:"uniqueIndex;not null"`
	Email        string `gorm:"uniqueIndex;not null"`
	PasswordHash string `gorm:"not null"`
	TwoFactorID  uint   `gorm:"column:two_factor_setting_id"` // Reference to two-factor settings
}

User 定义了用户账号管理模块的模型

Jump to

Keyboard shortcuts

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