from tortoise import fields

from app.schemas.menus import MenuType

from .base import BaseModel, TimestampMixin
from .enums import PolicyType

# 政策匹配度对应表
class Policy(BaseModel, TimestampMixin):
    code = fields.CharField(max_length=20, unique=True, description="行业代码", index=True)
    name = fields.CharField(max_length=20, description="行业名称")
    level = fields.CharEnumField(PolicyType, description="政策扶持等级")
    score = fields.IntField( description="政策匹配度基准分",default=0)

    class Meta:
        table = "policy"