package model

type StockMeta struct {
	Symbol             string  `json:"symbol"`
	RegularMarketPrice float64 `json:"regularMarketPrice"`
	Exchange           string  `json:"exchangeName"`
	Currency           string  `json:"currency"`
	Instrument         string  `json:"instrumentType"`
	FirstTrade         int64   `json:"firstTradeDate"`
	GMTOffset          int64   `json:"gmtoffset"`
	Timezone           string  `json:"exchangeTimezoneName"`
	ShortName          string  `json:"shortName"`
	LongName           string  `json:"longName"`
}

// Struct to represent a single dividend event
type DividendEvent struct {
	Amount float64 `json:"amount"`
	Date   int64   `json:"date"`
}

// Struct to represent the events object, specifically dividends
type Events struct {
	Dividends map[string]DividendEvent `json:"dividends"`
}

// Struct for the Yahoo Chart Response containing events (like dividends)
type YahooDividendChartResponse struct {
	Chart struct {
		Result []struct {
			Events Events `json:"events"`
		} `json:"result"`
	} `json:"chart"`
}

// Existing struct for general Yahoo Chart Response
type YahooChartResponse struct {
	Chart struct {
		Result []struct {
			Meta StockMeta `json:"meta"`
			// ... weitere Felder wie Timestamp, Indicators etc.
		} `json:"result"`
	} `json:"chart"`
}
