package org.dromara.rfid.domain.vo;


import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
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.rfid.domain.RfidLocation;

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

/**
 * 位置信息视图对象 rfid_location
 *
 * @author zch
 * @date 2025-11-25
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = RfidLocation.class)
public class RfidLocationVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @ExcelProperty(value = "标识")
    private Long id;

    /**
     * 位置编号
     */
    @ExcelProperty(value = "位置编号")
    private String locationCode;

    /**
     * 位置别名
     */
    @ExcelProperty(value = "位置别名")
    private String locationAlias;

    /**
     * 位置类型(1-车间;2-工序;3-工位)
     */
    @ExcelProperty(value = "位置类型(1-车间;2-工序;3-工位)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "location_type")
    private String locationType;

    /**
     * 父级编号，对应本表id
     */
    @ExcelProperty(value = "父级编号，对应本表id")
    private Long parentId;

    /**
     * 是否标识(1-是;0-否)
     */
    @ExcelProperty(value = "是否标识(1-是;0-否)", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "is_marked")
    private String isMarked;

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

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private String createdBy;

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

    /**
     * 更新人
     */
    @ExcelProperty(value = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @ExcelProperty(value = "更新时间")
    private Date updatedAt;

    /**
     * 子对象
     */
    private List<RfidLocationVo> children;

}
