fin-check-api/db/payment.go

24 lines
359 B
Go
Raw Normal View History

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
Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"`
2024-08-01 23:02:55 +02:00
Date time.Time
}