Add implemetation for db.UserIdentifiable interface for Debt entity
This commit is contained in:
parent
45123613fd
commit
7f4067ce31
15
db/debt.go
15
db/debt.go
|
@ -19,3 +19,18 @@ type Debt struct {
|
||||||
UserID uint
|
UserID uint
|
||||||
User *User
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user