model

package
v0.0.0-...-34c1202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func NewModel

func NewModel() *Model

func (*Model) GetAllStocks

func (m *Model) GetAllStocks() ([]*Stock, error)

func (*Model) GetLastMoneyFlow

func (m *Model) GetLastMoneyFlow(code string) (*MoneyFlow, error)

func (*Model) GetLastStockDaily

func (m *Model) GetLastStockDaily(code string) (*StockDaily, error)

func (*Model) GetMoneyFlows

func (m *Model) GetMoneyFlows(code string) ([]*MoneyFlow, error)

func (*Model) GetStockByCode

func (m *Model) GetStockByCode(code string) (*Stock, error)

func (*Model) InsertOrUpdateMoneyFlow

func (m *Model) InsertOrUpdateMoneyFlow(mf *MoneyFlow) (int64, error)

func (*Model) InsertOrUpdateStock

func (m *Model) InsertOrUpdateStock(stock *Stock) (int64, error)

func (*Model) InsertOrUpdateStockDaily

func (m *Model) InsertOrUpdateStockDaily(sd *StockDaily) (int64, error)

type MoneyFlow

type MoneyFlow struct {
	Id           int64
	Name         string
	Code         string
	ClosingPrice int64 //收盘价
	IncreaseRate int64 //涨跌幅
	TurnoverRate int64 //换手率
	NetAmount    int64 //净流入
	RatioAmount  int64 //净流入 比率 1587 --> 15.87%
	R0           int64 // 超大单成交额
	R0Net        int64 // 超大单净流入
	R1           int64 //大单成交额
	R1Net        int64 //大单净流入
	R2           int64 //小单成交额
	R2Net        int64 //小单净流入
	R3           int64 //散单成交额
	R3Net        int64 //散单净流入
	MarketDay    string
}

type Stock

type Stock struct {
	Id           int64
	Name         string //股票名称
	Code         string //股票代码
	TotalCapital int64  //总市值  单位股
	CurrCapital  int64  //流通市值 单位股
}

type StockDaily

type StockDaily struct {
	Id                 int64
	Name               string
	Code               string
	CurPrice           int64  //当前价格  单位分
	HighPrice          int64  //最高价格  单位分
	LowPrice           int64  //最低价格  单位分
	IncreaseAmount     int64  //涨跌额    单位分
	IncreaseRate       int64  //涨跌幅  百分比
	Turnover           int64  //成交额   单位分
	Volumn             int64  //成交量  手
	MainBuy            int64  //主力买入   单位分
	MainBuyRate        int64  //主力买入占比  单位万分之一
	MainSell           int64  //主力卖出 单位分
	MainSellRate       int64  //主力卖出占比 单位万分之一
	IndividualBuy      int64  //散户买入 单位分
	IndividualBuyRate  int64  //散户买入占比 单位万分之一
	IndividualSell     int64  //散户卖出 单位分
	IndividualSellRate int64  //散户卖出占比 单位万分之一
	MarketDay          string //日期
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL