package com.ningdatech.carapi.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ningdatech.carapi.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 运营商区域负责人
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-10-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("nd_operator_region_head")
@ApiModel(value = "OperatorRegionHead", description = "运营商区域负责人")
@AllArgsConstructor
@Builder
public class OperatorRegionHead extends BaseEntity {

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    private static final long serialVersionUID = 1L;

    /**
     * 区域负责人
     */
    @ApiModelProperty(value = "区域负责人")
    @NotEmpty(message = "区域负责人不能为空")
    @Size(max = 50, message = "区域负责人长度不能超过50")
    @TableField(value = "regional_head", condition = LIKE)
    private String regionalHead;

    /**
     * 区域id
     */
    @ApiModelProperty(value = "区域id")
    @TableField(value = "region_id")
    private Long regionId;

    /**
     * 区域名字
     */
    @ApiModelProperty(value = "区域名")
    @TableField(exist = false)
    private String regionName;

    /**
     *运营商ID
     */
    @ApiModelProperty(value = "运营商ID")
    @TableField(value = "operator_id")
    private Long operatorId;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @Size(max = 20, message = "联系电话长度不能超过20")
    @TableField(value = "mobile", condition = LIKE)
    private String mobile;

}
