Add implementation for db.UserIdentifiable for Item

This commit is contained in:
qowevisa 2024-11-18 09:51:46 +02:00
parent a9a4f26528
commit 3b3a8b13d6

View File

@ -22,6 +22,23 @@ type Item struct {
// //
TypeID uint TypeID uint
Type *Type Type *Type
UserID uint
User *User
}
// Implements db.UserIdentifiable:1
func (i Item) GetID() uint {
return i.ID
}
// Implements db.UserIdentifiable:2
func (i Item) GetUserID() uint {
return i.UserID
}
// Implements db.UserIdentifiable:3
func (i *Item) SetUserID(id uint) {
i.UserID = id
} }
func GetItem(id uint, preloadPrices bool) (*Item, error) { func GetItem(id uint, preloadPrices bool) (*Item, error) {