Discover Packages
github.com/utilyre/session-auth
models
package
Version:
v0.0.0-...-83e5abf
Opens a new window with list of versions in this module.
Published: Feb 8, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Session struct {
bun .BaseModel `bun:"table:sessions"`
ID int64 `bun:"id,pk,autoincrement"`
CreatedAt time .Time `bun:"created_at"`
UUID uuid .UUID `bun:"uuid"`
LastIP string `bun:"last_ip"`
UserID int64 `bun:"user_id"`
User *User `bun:"rel:belongs-to,join:user_id=id"`
}
type User struct {
bun .BaseModel `bun:"table:users"`
ID int64 `bun:"id,pk,autoincrement"`
Email string `bun:"email"`
Password []byte `bun:"password"`
Name string `bun:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.