package com.moral.api.pojo.form.unitConversion; 
 | 
  
 | 
import com.moral.api.entity.UnitConversion; 
 | 
import lombok.Data; 
 | 
import org.springframework.util.ObjectUtils; 
 | 
  
 | 
/** 
 | 
 * @ClassName UnitConversionUpdateForm 
 | 
 * @Description TODO 
 | 
 * @Author 陈凯裕 
 | 
 * @Date 2021/5/12 11:39 
 | 
 * @Version TODO 
 | 
 **/ 
 | 
@Data 
 | 
public class UnitConversionUpdateForm { 
 | 
  
 | 
    private Integer id; 
 | 
  
 | 
    private String formula; 
 | 
  
 | 
    public boolean valid(){ 
 | 
        if(ObjectUtils.isEmpty(formula)) 
 | 
            return false; 
 | 
        return true; 
 | 
    } 
 | 
  
 | 
    public UnitConversion formConvertEntity(){ 
 | 
        UnitConversion unitConversion = new UnitConversion(); 
 | 
        unitConversion.setId(id); 
 | 
        unitConversion.setFormula(formula); 
 | 
        return unitConversion; 
 | 
    } 
 | 
} 
 |