package com.njcn.advance.pojo.param.govern.voltage;

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;

@Data
public class IncomingLineParam {


    /**
     * 业务用户id
     */
    @ApiModelProperty("业务用户id")
    @NotBlank(message = ValidMessage.MISS_PREFIX + "userId")
    private String userId;

    /**
     * 进线名称
     */
    @ApiModelProperty("进线名称")
    @NotBlank(message = ValidMessage.NAME_NOT_BLANK)
    private String name;

    /**
     * 关联监测点id
     */
    @ApiModelProperty("业务用户id")
    @NotBlank(message = ValidMessage.MISS_PREFIX + "lineId")
    private String lineId;

    /**
     * 更新操作实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class IncomingLineUpdateParam extends IncomingLineParam {

        /**
         * 表Id
         */
        @ApiModelProperty("id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;

    }

}
