model

package
v0.0.0-...-7dcf9b1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserNameFieldCode = "username"
	IDFieldCode       = "id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginDTO

type LoginDTO struct {
	Username string
	Password string
}

type User

type User struct {
	ID        int64
	Info      UserInfo
	CreatedAt time.Time
	UpdatedAt sql.NullTime
	Password  string
}

type UserClaims

type UserClaims struct {
	jwt.StandardClaims
	Username string
	Role     UserRole
}

type UserCreate

type UserCreate struct {
	Info     UserInfo
	Password string
}

type UserInfo

type UserInfo struct {
	Username string
	Email    string
	Role     UserRole
}

type UserRole

type UserRole int8
const (
	UNKNOWN UserRole = iota
	USER
	ADMIN
)

type UserUpdate

type UserUpdate struct {
	ID   int64
	Info UserInfo
}

Jump to

Keyboard shortcuts

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