model

package
v0.0.0-...-cc0ac09 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 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 Role

type Role string
const (
	AdminRole Role = "admin"
	UserRole  Role = "user"
)

type User

type User struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid;primary_key;default:uuid_generate_v4()"`
	Email    string    `gorm:"unique;not null"`
	Username string    `gorm:"unique;not null"`
	FullName string    `gorm:"not null"`
	UserRole Role      `gorm:"default:user"`
}

Jump to

Keyboard shortcuts

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