package com.cool.store.vo.dict;

import com.cool.store.entity.dict.SysDictColumnDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 字典项简单信息VO
 * </p>
 *
 * @author wangff
 * @since 2025/9/26
 */
@Data
public class  DictColumnSimpleVO {
    @ApiModelProperty("字典项名称")
    private String columnName;

    @ApiModelProperty("字典项编码")
    private String columnCode;

    @ApiModelProperty("字典表编码")
    private String tableCode;

    @ApiModelProperty("关联项")
    private List<DictColumnSimpleVO> relationColumns;

    public static DictColumnSimpleVO of(SysDictColumnDO columnDO, String tableCode) {
        DictColumnSimpleVO vo = new DictColumnSimpleVO();
        vo.setColumnName(columnDO.getColumnName());
        vo.setColumnCode(columnDO.getColumnCode());
        vo.setTableCode(tableCode);
        vo.setRemark(columnDO.getRemark());
        return vo;
    }

    @ApiModelProperty("备注")
    private String remark;
}
