guzhi/app/models/esg.py
2025-09-30 22:26:02 +08:00

15 lines
594 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from tortoise import fields
from .base import BaseModel, TimestampMixin
from .enums import ESGType
# ESG关联价值对应表
class ESG(BaseModel, TimestampMixin):
code = fields.CharField(max_length=20, unique=True, description="行业代码", index=True)
name = fields.CharField(max_length=20, description="行业名称")
level = fields.CharEnumField(ESGType, description="ESG价值等级", index=True)
number = fields.IntField(default=0, description="ESG基准分")
remark = fields.TextField(default="简要说明ESG视角")
class Meta:
table = "esg"