Пример #1
0
func defineBidItemTable(dbm *gorp.DbMap) {
	// set "id" as primary key and autoincrement
	t := dbm.AddTable(models.BidItem{}).SetKeys(true, "id")
	// e.g. VARCHAR(25)
	t.ColMap("name").SetMaxSize(25)
}