model

package
v0.0.0-...-8a81ab5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloWorld

type HelloWorld struct {
	Hello string `json:"hello" example:"world"`
}

type User

type User struct {
	ID        string         `json:"id" gorm:"primaryKey"`
	Username  string         `json:"username" binding:"required" form:"username"`
	Email     string         `json:"email" binding:"required,email" form:"email"`
	Password  string         `json:"password" binding:"required" form:"password"`
	CreatedAt time.Time      `json:"created_at" gorm:"autoCreateTime"`
	UpdatedAt time.Time      `json:"updated_at" gorm:"autoUpdateTime"`
	DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"<-:false"`
}

func (*User) BeforeCreate

func (user *User) BeforeCreate(tx *gorm.DB) error

Jump to

Keyboard shortcuts

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