package model import "time" type Instrument struct { ID string `db:"id" json:"id"` Symbol string `db:"symbol" json:"symbol"` Exchange string `db:"exchange" json:"exchange"` Name string `db:"name" json:"name"` Price string `json:"price"` PriceCents int64 `db:"price_cents" json:"-"` ObservedAt time.Time `db:"observed_at" json:"observed_at"` ReceivedAt time.Time `db:"received_at" json:"received_at"` SourceID string `db:"source_id" json:"source_id"` SourceVersion int64 `db:"source_version" json:"source_version"` } func (Instrument) TableName() string { return "veyra_instrument" } type MarketSync struct { ID string `db:"id" json:"id"` SourceID string `db:"source_id" json:"source_id"` SourceVersion int64 `db:"source_version" json:"source_version"` InstrumentCount int `db:"instrument_count" json:"instrument_count"` Status string `db:"status" json:"status"` Message string `db:"message" json:"message"` StartedAt time.Time `db:"started_at" json:"started_at"` FinishedAt time.Time `db:"finished_at" json:"finished_at"` } func (MarketSync) TableName() string { return "veyra_market_sync" } type MarketHistory struct { Symbol string `json:"symbol"` Exchange string `json:"exchange"` Name string `json:"name"` Source string `json:"source"` SourceVersion int64 `json:"source_version"` Adjustment string `json:"adjustment"` ReceivedAt time.Time `json:"received_at"` Bars []HistoricalBar `json:"bars"` }