model

package
v0.0.0-...-3c76feb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ad struct {
	ID        uint   `gorm:"primary_key"`
	EbayID    string `gorm:"type:varchar(255)"`
	QueryID   uint   `gorm:"index:ad_queryid"`
	Location  string `gorm:"type:varchar(510)"`
	CreatedAt time.Time
}

Ad that is beeing stored

type Query

type Query struct {
	gorm.Model
	ChatID   int64 `gorm:"index:chatid"`
	LastAds  []Ad
	Term     string `gorm:"type:varchar(100)"`
	Radius   int
	City     int
	CityName string `gorm:"type:varchar(100)"`
	MaxPrice *int
	MinPrice *int
}

Query that is beeing sored

func (*Query) AfterDelete

func (u *Query) AfterDelete(tx *gorm.DB) (err error)

AfterDelete delete all assiciated ads

Jump to

Keyboard shortcuts

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