package org.dromara.mall.product.domain.vo;

import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.mall.product.domain.MallAttribute;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 属性视图对象 mall_attribute
 *
 * @author pengles
 */
@Data
@AutoMapper(target = MallAttribute.class)
public class MallAttributeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 属性ID
     */
    @ExcelProperty(value = "属性ID")
    private Long id;

    /**
     * 模板ID(可选，绑定到模板)
     */
    @ExcelProperty(value = "模板ID")
    private Long templateId;

    /**
     * 属性名称
     */
    @ExcelProperty(value = "属性名称")
    private String name;

    /**
     * 属性类型(0文本 1数字 2日期 3枚举)
     */
    @ExcelProperty(value = "属性类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=文本,1=数字,2=日期,3=枚举")
    private Integer type;

    /**
     * 是否必填(0否 1是)
     */
    @ExcelProperty(value = "是否必填", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=否,1=是")
    private Integer required;

    /**
     * 排序
     */
    @ExcelProperty(value = "排序")
    private Integer sort;

    /**
     * 状态(0启用 1禁用)
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=启用,1=禁用")
    private Integer status;

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

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

}
