Auto-remove stale products (#30)
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d6ee2922d7
commit
b6feb2d656
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ type TelegramMessage struct {
|
|||
gorm.Model
|
||||
MessageID int `gorm:"not null;unique"`
|
||||
ProductURL string
|
||||
Product Product `gorm:"not null;references:URL"`
|
||||
Product Product `gorm:"not null;references:URL;constraint:OnDelete:CASCADE"`
|
||||
}
|
||||
|
||||
// TelegramNotifier to manage notifications to Twitter
|
||||
|
|
|
@ -25,7 +25,7 @@ type Tweet struct {
|
|||
LastTweetID int64 `gorm:"index"`
|
||||
Counter int64 `gorm:"not null;default:1"`
|
||||
ProductURL string `gorm:"index"`
|
||||
Product Product `gorm:"not null;references:URL"`
|
||||
Product Product `gorm:"not null;references:URL;constraint:OnDelete:CASCADE"`
|
||||
}
|
||||
|
||||
// TwitterNotifier to manage notifications to Twitter
|
||||
|
|
Reference in a new issue