Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Log *logrus.Logger DBFile string DB *bun.DB DBType dialect.Name // contains filtered or unexported fields }
Config configures the database to initialize
type Fruit ¶
type Fruit struct { bun.BaseModel `bun:"table:fruits,alias:f"` ID int `bun:",pk,autoincrement,nullzero" json:"id"` Name string `bun:",notnull" json:"name" ` Season string `bun:",notnull" json:"season"` Emoji string `bun:"," json:"emoji,omitempty"` CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp" json:"-"` ModifiedAt time.Time `json:"-"` }
Fruit model to hold the Fruit data
func (*Fruit) BeforeAppendModel ¶
BeforeAppendModel implements schema.BeforeAppendModelHook
Click to show internal directories.
Click to hide internal directories.