diff --git a/db/payment.go b/db/payment.go index b3896e0..3256e4a 100644 --- a/db/payment.go +++ b/db/payment.go @@ -18,6 +18,6 @@ type Payment struct { Title string Descr string Note string - Items []ItemBought + Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"` Date time.Time }