model

package
v0.2.3-alpha-2 Latest Latest
Warning

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

Go to latest
Published: May 12, 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 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 *time.Time `json:"deletedAt"`
}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt" 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