model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatedAt

func CreatedAt(s string) func(db *gorm.DB) *gorm.DB

func ExpireDays

func ExpireDays(expireDays int) func(db *gorm.DB) *gorm.DB

func MatchWord

func MatchWord(w string) func(db *gorm.DB) *gorm.DB

func Paginate

func Paginate(page int, per int) func(db *gorm.DB) *gorm.DB

Types

type Mail

type Mail struct {
	ID         uint
	CreatedAt  time.Time `gorm:"not null"`
	Date       string    `gorm:"not null;index:search"`
	Source     string    `gorm:"not null"`
	SearchText string    `gorm:"not null"`
}

func (*Mail) BeforeSave

func (m *Mail) BeforeSave(tx *gorm.DB) (err error)

func (*Mail) Parse

func (m *Mail) Parse() (letters.Email, error)

Jump to

Keyboard shortcuts

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