model

package
v0.2.3-alpha-9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 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 Model

type Model struct {
	ID goat.ID `json:"id" gorm:"primaryKey"`
}

func NewModel

func NewModel() *Model

func (*Model) BeforeCreate

func (m *Model) BeforeCreate(tx *gorm.DB) error

type SoftDelete

type SoftDelete struct {
	DeletedAt gorm.DeletedAt `json:"deleted_at"`
}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at" gorm:"<-:update"`
}

func (*Timestamps) BeforeUpdate

func (m *Timestamps) BeforeUpdate(tx *gorm.DB) error

Jump to

Keyboard shortcuts

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