Documentation
¶
Index ¶
- type BaseModel
- type Q
- func (q *Q[T, ID]) DeleteBy(cond db.Cond) error
- func (q *Q[T, ID]) Get(id ID) (*T, error)
- func (q *Q[T, ID]) GetBy(field string, value any) (*T, error)
- func (q *Q[T, ID]) GetMulti(ids []ID) (ts []T, err error)
- func (q *Q[T, ID]) LikeBy(prefix string) ([]T, error)
- func (q *Q[T, ID]) ListBy(cond db.Cond, order string, offset, limit int) ([]*T, error)
- func (q *Q[T, ID]) Save(t db.Record) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { ID int64 `db:"id" json:"id"` Status int `db:"status" json:"-"` Ctime time.Time `db:"ctime" json:"ctime"` Mtime time.Time `db:"mtime" json:"-"` }
BaseModel base model
Click to show internal directories.
Click to hide internal directories.