package thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 描述： 药品计量
 * </p>
 *
 * @author xc
 * @date 2022-01-14 08:33
 */
@Data
public class YaoPingJiLiang implements Serializable {

    private static final long serialVersionUID = 4504660713708795989L;
    private String code;
    private String name;
    private BigDecimal value;

    public YaoPingJiLiang(String code, String name, BigDecimal value) {
        this.code = code;
        this.name = name;
        this.value = value;
    }

    public BigDecimal getValue() {
        if (value == null) {
            return new BigDecimal(1);
        }
        return value;
    }
}
