Using struct attrs to match desired db schema

This commit is contained in:
Matthew Dillon 2014-10-16 09:20:25 -08:00
parent 7fe5566edf
commit 7e74d672ba
6 changed files with 27 additions and 27 deletions

View file

@ -12,11 +12,11 @@ import (
// A Species is a high-level classifier in bactdb.
type Species struct {
Id int64 `json:"id,omitempty"`
GenusId int64 `json:"genus_id"`
SpeciesName string `json:"species_name"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt time.Time `json:"deleted_at"`
GenusId int64 `db:"genus_id" json:"genus_id"`
SpeciesName string `db:"species_name" json:"species_name"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
DeletedAt time.Time `db:"deleted_at" json:"deleted_at"`
}
// SpeciesService interacts with the species-related endpoints in bactdb's API.