wance_data/src/models/stock_data_processing.py

20 lines
898 B
Python

from tortoise import Model, fields
from tortoise.contrib.pydantic import pydantic_model_creator
from src.models import with_table_name, StockType
class StockDataProcessing(Model):
bt_benchmark_code = fields.CharField(max_length=6, null=True, description='基准代码', )
bt_stock_period = fields.CharField(max_length=10, null=True, description='数据类型', )
bt_strategy_name = fields.CharField(max_length=10, null=True, description='回测策略名', )
id = fields.IntField(pk=True, )
processing_data = fields.BinaryField(null=True, description='清洗后的数据', )
prosessing_date = fields.CharField(max_length=10, null=True, description='当前回测时间', )
stock_name = fields.CharField(max_length=10, null=True, )
stocke_code = fields.CharField(max_length=10, null=True, )
class Meta:
table = with_table_name("stock_data_processing")