package com.bonus.common.entity.bracelet.vo;

import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.annotation.Excel.ColumnType;
import io.swagger.annotations.Api;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

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

/**
 * 工程杆塔表 tb_project_power
 *
 * @author bonus
 */

@Api("GtVo")
@Data
public class GtVo
{
    /**
     * 序号
     */
    private String serialNumber;

    /** 工程id */
    @Excel(name = "工程id")
    private long proId;

    /** 杆塔id */
//    @Excel(name = "杆塔id", cellType = ColumnType.NUMERIC)
    private int gtId;

    /** 杆塔编号 */
    @Excel(name = "杆塔编号")
    @NotBlank(message = "杆塔编号不能为空", groups = {GtVo.Query.class})
    @Length(max = 20, message = "杆塔编号长度不能超过20", groups = {GtVo.Query.class})
    private String gtCode;

    /** 经度 */
    @NotBlank(message = "经度不能为空", groups = {GtVo.Query.class})
    @Length(max = 32, message = "经度长度不能超过32", groups = {GtVo.Query.class})
    @Pattern(regexp = "^-?((\\d{1,2}|1[0-7]\\d|180)(\\.\\d{1,6})?)$", message = "经度格式不正确", groups = {GtVo.Query.class})
    private String lon;

    /** 纬度 */
    @NotBlank(message = "纬度不能为空", groups = {GtVo.Query.class})
    @Length(max = 32, message = "纬度长度不能超过32", groups = {GtVo.Query.class})
    @Pattern(regexp = "^-?([0-8]?\\d(\\.\\d{1,6})?|90(\\.0{1,6})?)$", message = "纬度格式不正确", groups = {GtVo.Query.class})
    private String lat;

    /**
     * 查询条件限制
     */
    public interface Query {
    }
}
