1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
package models import ( "encoding/gob" "github.com/uptrace/bun" ) func init() { gob.Register(User{}) } type User struct { bun.BaseModel `bun:"table:users,alias:u"` ID int `bun:"id,pk,autoincrement"` Email string Password string Username string Photo *string }