Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Expense ¶
type Expense struct {
bun.BaseModel `bun:"table:expenses" json:"-"`
ID int `bun:",pk,autoincrement"`
UserID int `bun:",notnull"`
Amount float64 `bun:",notnull"`
Category string `bun:",notnull"`
Description string `bun:",notnull"`
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
}
type User ¶
type User struct {
bun.BaseModel `bun:"table:users" json:"-"`
ID int `bun:",pk,autoincrement"`
Username string `bun:",unique,notnull"`
Email string `bun:",unique,notnull"`
Password string `bun:",notnull"`
Role string `bun:",notnull,default:'user'"`
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
}
func (*User) ComparePassword ¶
func (*User) HashPassword ¶
Click to show internal directories.
Click to hide internal directories.