class FilterFieldVO:
    def __init__(self, **kwargs):
        self.id: str
        self.values: List[str]
        self.label: str
        self.labels: str
        self.operator: str  # 逻辑比较符
        self.filter: FilterFieldVO
        self.visibletype: str
        self.type: str
        self.conditiontype: str  # 搜索框 下拉框
        self.name: str
        self.uitype: str
        self.title: str
        self.acid: str = ""  # 导入临时表时 此字段不为空

        self.date_type: int  # 0 今天 1 昨天 2 最近n天 3本月 4自定义

        self.is_half: bool

        self.latest_day: int

        self.contrastDatetime: FilterFieldVO  # 对比时间段

        # 一键同环比类型，customTime:自定义时间段，yearContrast:年同比，monthBasis:月环比
        self.contrastType: str
        # 一键同环比类型对应的值，自定义时间段为空；年同比时选择去年，前年，大前年；月环比选择最近24个月的数据
        self.contrastValue: str
        # 如果选择年同比和月环比，则需要把contrastDatetimeV2值赋值给contrastDatetime
        self.contrastDatetimeV2: FilterFieldVO
        self.defaultTimeFilter: bool = False  # 是否是默认dt的时间过滤，默认所有查询都必须有该参数
        self.defaultTimeFilterType: int = 0  # 0 为日期筛选，1为小时筛选

        self.userGroupFilterValues: List[str] = []  # 用于用户群筛选，放置临时表名
        self.joinKeyId: int  # 用于用户群筛选，放置关联的 com.vip.vman.service.DataRetrievalService.JoinKey 的 id
        self.group: List[str]  # 用于用户群筛选，任务组 ID 列表，前端回显使用，后端没有使用
        self.segType: str  # 用于用户群筛选，值有：“task”：任务，“group”：任务组，前端回显使用，后端没有使用

        self.enabled: bool  # 前端回显使用，后端没有使用

        self.typede: str

    def __repr__(self):
        return f"FilterFieldVO(id={self.id}, values={self.values}, label={self.label}, labels={self.labels}, operator={self.operator}, filter={self.filter}, visibletype={self.visibletype}, type={self.type}, conditiontype={self.conditiontype}, name={self.name}, uitype={self.uitype}, title={self.title}, acid={self.acid}, date_type={self.date_type}, is_half={self.is_half}, latest_day={self.latest_day}, contrastDatetime={self.contrastDatetime}, contrastType={self.contrastType}, contrastValue={self.contrastValue}, contrastDatetimeV2={self.contrastDatetimeV2}, defaultTimeFilter={self.defaultTimeFilter}, defaultTimeFilterType={self.defaultTimeFilterType}, userGroupFilterValues={self.userGroupFilterValues}, joinKeyId={self.joinKeyId}, group={self.group}, segType={self.segType}, enabled={self.enabled}, typede={self.typede}, ext={self.ext})"


class FrameParam:
    def __init__(self, **kwargs):
        self.filter: List[FilterFieldVO] = []

    def __repr__(self):
        return f"FrameParam(filter={self.filter})"


if __name__ == '__main__':
    aa = '{"filter":[{"acid":"","acidTableName":"av_import_","contrast":false,"contrastDatetime":{"acid":"","acidTableName":"av_import_","contrast":false,"contrastDatetimeFilter":false,"date_type":0,"defaultTimeFilter":false,"defaultTimeFilterType":0,"importAcid":[],"is_half":false,"jsonUiType":false,"latest_day":7,"rsField":false,"timeField":false,"userGroupABTDimField":false,"userGroupABTRatio":"u_group_abt_ratio","userGroupDatasetName":"t_user_group","userGroupDimField":false,"userGroupField":false,"userGroupFilterValues":[],"userGroupOrUserGroupDimField":false,"userGroupTag":"u_group_tag","userGroupTotal":"u_group_total","userGroupV1Field":false,"userGroupV2Field":false,"values":[]},"contrastDatetimeFilter":false,"contrastDatetimeV2":{"acid":"","acidTableName":"av_import_","contrast":false,"contrastDatetimeFilter":false,"defaultTimeFilter":false,"defaultTimeFilterType":0,"importAcid":[],"jsonUiType":false,"rsField":false,"timeField":false,"userGroupABTDimField":false,"userGroupABTRatio":"u_group_abt_ratio","userGroupDatasetName":"t_user_group","userGroupDimField":false,"userGroupField":false,"userGroupFilterValues":[],"userGroupOrUserGroupDimField":false,"userGroupTag":"u_group_tag","userGroupTotal":"u_group_total","userGroupV1Field":false,"userGroupV2Field":false,"values":[]},"contrastType":"","date_type":1,"defaultTimeFilter":false,"defaultTimeFilterType":0,"importAcid":[],"is_half":false,"jsonUiType":false,"label":"时间","labels":"2024-06-02;2024-06-02","latest_day":7,"rsField":false,"timeField":true,"title":"筛选日期 介于 2024-06-02 ~ 2024-06-02","uitype":"date","userGroupABTDimField":false,"userGroupABTRatio":"u_group_abt_ratio","userGroupDatasetName":"t_user_group","userGroupDimField":false,"userGroupField":false,"userGroupFilterValues":[],"userGroupOrUserGroupDimField":false,"userGroupTag":"u_group_tag","userGroupTotal":"u_group_total","userGroupV1Field":false,"userGroupV2Field":false,"values":["2024-06-02","2024-06-02"]},{"acid":"","acidTableName":"av_import_","conditiontype":"selection_muti","contrast":false,"contrastDatetimeFilter":false,"defaultTimeFilter":false,"defaultTimeFilterType":0,"enabled":true,"id":1274,"importAcid":[],"jsonUiType":false,"label":"品牌名称","labels":"阿迪达斯adidas","name":"品牌名称","operator":"in","rsField":false,"stringId":"1274","subjectId":"3","timeField":false,"title":"品牌名称 属于 阿迪达斯adidas","typede":"dimension","uitype":"selection_muti","userGroupABTDimField":false,"userGroupABTRatio":"u_group_abt_ratio","userGroupDatasetName":"t_user_group","userGroupDimField":false,"userGroupField":false,"userGroupFilterValues":[],"userGroupOrUserGroupDimField":false,"userGroupTag":"u_group_tag","userGroupTotal":"u_group_total","userGroupV1Field":false,"userGroupV2Field":false,"values":["阿迪达斯adidas"]}],"magnanimity":[],"row":[]}'
    aa_json:dict = json.loads(aa)
    print(type(aa_json))
    print(aa_json)
    param = FrameParam(aa_json)
    print(param)




main 方法报错 TypeError: FrameParam.__init__() takes 1 positional argument but 2 were given