From 7f4067ce31e9edb04da9e43cd2c6aedc470960db Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 2 Nov 2024 00:05:28 +0200 Subject: [PATCH] Add implemetation for db.UserIdentifiable interface for Debt entity --- db/debt.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/db/debt.go b/db/debt.go index ba07c29..537e67c 100644 --- a/db/debt.go +++ b/db/debt.go @@ -19,3 +19,18 @@ type Debt struct { UserID uint User *User } + +// Implements db.UserIdentifiable:1 +func (d Debt) GetID() uint { + return d.ID +} + +// Implements db.UserIdentifiable:2 +func (d Debt) GetUserID() uint { + return d.UserID +} + +// Implements db.UserIdentifiable:3 +func (d *Debt) SetUserID(id uint) { + d.UserID = id +}