from typing import TypedDict, NotRequired, TypeVar, Generic

from ldnode.calculator.schemas.enumerations import (
    SecurityPoolType, 
    SecurityPoolCustomizeType,
    BuiltinScope,
)
from .factor import ExcludeFactor


SCOPE = TypeVar("SCOPE", bound=BuiltinScope)


class SecurityPool(TypedDict, Generic[SCOPE]):
    """标的池"""
    pool_type: SecurityPoolType
    pool_builtin_scope: NotRequired[SCOPE]
    pool_customize_type: NotRequired[SecurityPoolCustomizeType]
    pool_securities: NotRequired[list[str]]
    pool_filter_factors: NotRequired[list[ExcludeFactor]]
