package com.ruoyi.ss.customerService.domain;

import com.ruoyi.common.constants.DictTypeConstants;
import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.common.utils.RegexpUtils;
import com.ruoyi.system.valid.DictValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 客服对象 ss_customer_service
 *
 * @author ruoyi
 * @date 2024-09-19
 */
@Data
public class CustomerService extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "名称")
    @ApiModelProperty("名称")
    @Size(max = 32, message = "名称长度不能超过32个字符")
    @NotBlank(message = "名称不能为空", groups = {ValidGroup.Create.class})
    private String name;

    @Excel(name = "手机号")
    @ApiModelProperty("手机号")
    @Size(max = 11, message = "手机号长度不能超过11个字符")
    @Pattern(regexp = RegexpUtils.MOBILE_PHONE_REGEXP, message = "手机号格式不正确")
    private String mobile;

    @Excel(name = "类型", readConverterExp = "1=官方客服")
    @ApiModelProperty("类型")
    @DictValid(type = DictTypeConstants.CUSTOMER_SERVICE_TYPE, message = "非法的客服类型")
    @NotBlank(message = "类型不能为空", groups = {ValidGroup.Create.class})
    private String type;

    @Excel(name = "微信号")
    @ApiModelProperty("微信号")
    @Size(max = 64, message = "微信号长度不能超过64个字符")
    private String wx;

    @Excel(name = "排序")
    @ApiModelProperty("排序")
    private Integer sort;
}
