models

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 5 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 {
	UUID      uuid.UUID  `gorm:"primaryKey" json:"uuid"`
	CreatedAt time.Time  `json:"-"`
	UpdatedAt time.Time  `json:"-"`
	DeletedAt *time.Time `sql:"index" json:"-"`
}

func (*Model) BeforeSave

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

type Word

type Word struct {
	Model
	IsNull   bool   `gorm:"-" json:"isNull,omitempty"`
	Word     string `gorm:"unique;not null;" json:"word,omitempty"`
	Repeated int    `gorm:"not null;default:1;" json:"repeated,omitempty"`
	Pattern  string `gorm:"-" json:"pattern,omitempty"`
}

func (*Word) BeforeSave

func (word *Word) BeforeSave(tx *gorm.DB) error

Jump to

Keyboard shortcuts

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