package com.yem.wm.es.framework.op;

import com.yem.wm.es.framework.validator.FrameworkContractDelValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;

import java.util.List;

/**
 * @author xwudd
 * @date 18:30
 * @Description
 **/
public class FrameworkContractDelOp extends AbstractOperationServicePlugIn {

    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_entryentitys");
        fieldKeys.add("yem_salecontract");
        fieldKeys.add("yem_contractamount");
    }

    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        super.onAddValidators(e);
        e.addValidator(new FrameworkContractDelValidator());
    }

}
