2024-08-01 23:02:55 +02:00
|
|
|
package db
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
// For grocery payment
|
|
|
|
type Payment struct {
|
|
|
|
gorm.Model
|
2024-08-03 07:05:46 +02:00
|
|
|
CardID uint
|
|
|
|
Card *Card
|
2024-08-01 23:02:55 +02:00
|
|
|
CategoryID uint
|
|
|
|
Category *Category
|
2024-11-01 21:54:29 +01:00
|
|
|
UserID uint
|
|
|
|
User *User
|
2024-11-01 08:30:51 +01:00
|
|
|
Title string
|
2024-08-01 23:02:55 +02:00
|
|
|
Descr string
|
|
|
|
Note string
|
2024-11-20 17:18:29 +01:00
|
|
|
Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"`
|
2024-08-01 23:02:55 +02:00
|
|
|
Date time.Time
|
|
|
|
}
|