package cn.iocoder.foodnexus.module.erp.dal.dataobject.purchase;

import cn.iocoder.foodnexus.framework.common.util.json.JsonUtils;
import cn.iocoder.foodnexus.module.erp.api.vo.supplier.ErpSupplierFiles;
import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler;

import java.util.List;

/**
 * @author : yanghao
 * create at:  2025/9/1  17:06
 * @description:
 */
public class ErpSupplierFilesTypeHandler extends AbstractJsonTypeHandler<List<ErpSupplierFiles>> {

    public ErpSupplierFilesTypeHandler(Class<?> type) {
        super(type);
    }

    @Override
    public List<ErpSupplierFiles> parse(String json) {
        return JsonUtils.parseArray(json, ErpSupplierFiles.class);
    }

    @Override
    public String toJson(List<ErpSupplierFiles> obj) {
        return JsonUtils.toJsonString(obj);
    }
}
