package org.eco.als.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.eco.common.mapper.annotation.FieldMapper;
import com.eco.common.mapper.constant.MapperConstant;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.eco.als.domain.Model;
import org.eco.common.excel.annotation.ExcelDictFormat;
import org.eco.common.excel.convert.ExcelDictConvert;
import org.eco.common.orm.core.domain.BaseEntity;

import java.io.Serial;
import java.io.Serializable;

/**
 * 模型信息视图对象 als_model_t
 *
 * @author wgk
 * @date 2024-07-22
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Model.class)
public class ModelVo extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @ExcelProperty(value = "编号")
    private Long id;

    /**
     * 模型名称
     */
    @ExcelProperty(value = "模型名称")
    private String name;

    /**
     * 模型类型
     */
    @ExcelProperty(value = "模型类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_app_type")
    private String type;

    /**
     * 模型链接
     */
    @ExcelProperty(value = "模型链接")
    private String url;

    /**
     * 参数
     */
    @ExcelProperty(value = "参数")
    private String param;

    /**
     * 数据列
     */
    @ExcelProperty(value = "数据列")
    private String columnData;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_common_status")
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 删除标识（1删除 0未删除）
     */
    @ExcelProperty(value = "删除标识（1删除 0未删除）")
    private Integer delFlag;

    /**
     * 创建人名称
     */
    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "createBy")
    private String createByName;

    /**
     * 创建人名称
     */
    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "updateBy")
    private String updateByName;

}
