You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
226 B
Go
18 lines
226 B
Go
3 years ago
|
package models
|
||
|
|
||
|
import "gorm.io/gorm"
|
||
|
|
||
|
type User struct {
|
||
|
gorm.Model
|
||
|
UserName string
|
||
|
Items []Item
|
||
|
}
|
||
|
|
||
|
func (user User) GetId() int {
|
||
|
return int(user.ID)
|
||
|
}
|
||
|
|
||
|
func (user User) GetUsername() string {
|
||
|
return user.UserName
|
||
|
}
|