Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
ID uint `db:"id"`
Name string `db:"name"`
UserID uint `db:"user_id"`
User *User `db:"-"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
Address represents an address model
type BigSerialUser ¶ added in v0.5.0
type BigSerialUser struct {
ID int64 `db:"id"`
Name string `db:"name"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
BigSerialUser represents a user model with int64 ID for bigserial testing
func (BigSerialUser) TableName ¶ added in v0.5.0
func (BigSerialUser) TableName() string
type Book ¶
type Book struct {
ID uint `db:"id"`
Name string `db:"name"`
UserID uint `db:"user_id"`
User *User `db:"-"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
Book represents a book model
type JsonData ¶
type JsonData struct {
ID uint `db:"id"`
Data string `db:"data"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
JsonData represents a JSON data model
type People ¶
type People struct {
ID uint `db:"id"`
Body string `db:"body"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
People represents a people model
type User ¶
type User struct {
soft_delete.SoftDeletes
ID uint `db:"id"`
Name string `db:"name"`
Avatar string `db:"avatar"`
Bio *string `db:"bio"`
Votes int `db:"votes"`
Address *Address `db:"-"`
Books []*Book `db:"-"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
User represents a user model with associations
Click to show internal directories.
Click to hide internal directories.