Made all types implement Identifiable

This commit is contained in:
2019-09-09 09:18:34 +09:00
parent 8bfb1e0b4d
commit 85bd1441a6
4 changed files with 20 additions and 0 deletions

View File

@ -5,3 +5,8 @@ type NickToUser struct {
Nick string `json:"nick" primary:"true"`
UserID UserID `json:"userId"`
}
// GetID returns the primary key which is the nickname.
func (mapping *NickToUser) GetID() string {
return mapping.Nick
}