gorm

package
v0.0.0-...-c234f5e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	ID   int
	Name string
}

type Result

type Result struct {
	ID   int
	Name string
	Age  int
}

type User

type User struct {
	Name      string
	Age       int
	Birthday  time.Time
	ID        uint `gorm:"primaryKey"` // 设置主键
	Role      string
	UUID      uuid.UUID
	CreatedAt time.Time
	Active    bool
}

func (*User) BeforeCreate

func (u *User) BeforeCreate(tx *gorm.DB) (err error)

func (*User) BeforeDelete

func (u *User) BeforeDelete(tx *gorm.DB) (err error)

Delete Hooks

Jump to

Keyboard shortcuts

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