Add Paymenr Item and ItemBought as entities in PaymentGroup for db interface resolution
This commit is contained in:
parent
4244e397f3
commit
81b379afbd
|
@ -27,6 +27,8 @@ type Item struct {
|
|||
User *User
|
||||
}
|
||||
|
||||
func (i Item) __internalBelogingToPayment() {}
|
||||
|
||||
// Implements db.UserIdentifiable:1
|
||||
func (i Item) GetID() uint {
|
||||
return i.ID
|
||||
|
|
|
@ -15,3 +15,5 @@ type ItemBought struct {
|
|||
MetricType uint8
|
||||
MetricValue uint64
|
||||
}
|
||||
|
||||
func (i ItemBought) __internalBelogingToPayment() {}
|
||||
|
|
|
@ -21,3 +21,5 @@ type Payment struct {
|
|||
Items []ItemBought `gorm:"constraint:OnDelete:CASCADE;"`
|
||||
Date time.Time
|
||||
}
|
||||
|
||||
func (p Payment) __internalBelogingToPayment() {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user