package com.ruoyi.dpc.domain.dto;

import com.ruoyi.common.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 员工亲属新增 DTO
 *
 * @author ruoyi
 * @date 2026-01-28
 */
@Data
public class DpcEmployeeRelativeAddDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 亲属姓名 */
    @Excel(name = "亲属姓名")
    @NotBlank(message = "亲属姓名不能为空")
    @Size(max = 100, message = "亲属姓名长度不能超过100个字符")
    private String relativeName;

    /** 亲属身份证号 */
    @Excel(name = "亲属身份证号")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[0-9Xx]$", message = "亲属身份证号格式不正确")
    private String relativeIdCard;

    /** 亲属手机号 */
    @Excel(name = "亲属手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "亲属手机号格式不正确")
    private String relativePhone;

    /** 与员工关系 */
    @Excel(name = "与员工关系")
    @NotBlank(message = "与员工关系不能为空")
    @Size(max = 50, message = "与员工关系长度不能超过50个字符")
    private String relationship;
}
