fasiondog 2021-12-11 00:50:12 +08:00
parent c375084d7f
commit 804108ddf6
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ void export_TimeLineReord() {
class_<TimeLineRecord>("TimeLineRecord", "分时线记录,属性可读写", init<>())
.def(init<const Datetime&, price_t, price_t>())
.def(self_ns::str(self))
.def_readwrite("datetime", &TimeLineRecord::datetime, "日期时间")
.def_readwrite("date", &TimeLineRecord::datetime, "日期时间")
.def_readwrite("price", &TimeLineRecord::price, "价格")
.def_readwrite("vol", &TimeLineRecord::vol, "成交量")
.def(self == self)

View File

@ -17,7 +17,7 @@ void export_TransRecord() {
class_<TransRecord>("TransRecord", init<>())
.def(init<const Datetime&, price_t, price_t, TransRecord::DIRECT>())
.def(self_ns::str(self))
.def_readwrite("datetime", &TransRecord::datetime, "时间")
.def_readwrite("date", &TransRecord::datetime, "时间")
.def_readwrite("price", &TransRecord::price, "价格")
.def_readwrite("vol", &TransRecord::vol, "成交量")
.def_readwrite("direct", &TransRecord::direct, "买卖盘性质, 参见: TransRecord.DIRECT")