package com.njcn.device.pq.pojo.param;

import com.alibaba.excel.annotation.ExcelProperty;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * Description:
 * Date: 2024/11/5  11:34【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
public class PqDevTypeParam {

    /**
     * icd文件名
     */
    @ApiModelProperty("装置类型名称")
    @NotBlank(message = "装置类型名称不能为空")
    private String name;

    /**
     * 关联icdId
     */
    @ApiModelProperty("关联icd表Id")
    @NotBlank(message = "关联icd不能为空")
    private String icdId;

    /**
     * 更新操作实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class PqDevTypeUpdateParam extends PqDevTypeParam {
        /**
         * 表Id
         */
        @ApiModelProperty("id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;

    }

    @Data
    public static class A {

        @ApiModelProperty("Id")
        private String id;

        @ExcelProperty("Name")
        private String name;
    }
}
