Add Paymenr Item and ItemBought as entities in PaymentGroup for db interface resolution

This commit is contained in:
qowevisa 2024-11-20 18:19:12 +02:00
parent 4244e397f3
commit 81b379afbd
3 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,8 @@ type Item struct {
User *User User *User
} }
func (i Item) __internalBelogingToPayment() {}
// Implements db.UserIdentifiable:1 // Implements db.UserIdentifiable:1
func (i Item) GetID() uint { func (i Item) GetID() uint {
return i.ID return i.ID

View File

@ -15,3 +15,5 @@ type ItemBought struct {
MetricType uint8 MetricType uint8
MetricValue uint64 MetricValue uint64
} }
func (i ItemBought) __internalBelogingToPayment() {}

View File

@ -21,3 +21,5 @@ type Payment struct {
Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"` Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"`
Date time.Time Date time.Time
} }
func (p Payment) __internalBelogingToPayment() {}