package cn.lihongjie.coal.product.dto;

import cn.lihongjie.coal.base.dto.OrgCommonDto;

import lombok.Data;

import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;

@Data
public class UpdateProductDto extends OrgCommonDto {
    @Comment("煤源类型")
    private String coalType;

    @Formula(
            "(select i.name\n"
            + "from t_dictionary d,\n"
            + "     t_dictionary_item i\n"
            + "where d.id = i.dictionary_id\n"
            + "  and d.code = 'coal.type'\n"
            + "  and i.code = coal_type)")
    private String coalTypeName;
}
