package com.aegis.resource.team.domain;

import com.aegis.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 队伍成员实体类 resource_team_member
 * 
 * @author aegis
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("resource_team_member")
public class TeamMember extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 成员ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 队伍ID */
    @NotNull(message = "队伍ID不能为空")
    private Long teamId;

    /** 关联的系统用户ID */
    private Long userId;

    /** 成员姓名 */
    @NotBlank(message = "成员姓名不能为空")
    @Size(max = 64, message = "成员姓名长度不能超过64个字符")
    private String memberName;

    /** 成员编号 */
    @Size(max = 50, message = "成员编号长度不能超过50个字符")
    private String memberCode;

    /** 身份证号 */
    @Size(max = 18, message = "身份证号长度不能超过18个字符")
    private String idCard;

    /** 联系电话 */
    @Size(max = 20, message = "联系电话长度不能超过20个字符")
    private String phone;

    /** 职位/角色 */
    @Size(max = 64, message = "职位/角色长度不能超过64个字符")
    private String position;

    /** 专长 */
    @Size(max = 200, message = "专长长度不能超过200个字符")
    private String specialty;

    /** 状态：active-在岗，leave-请假，retired-退休 */
    @Size(max = 16, message = "状态长度不能超过16个字符")
    private String status;

    /** 加入日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date joinDate;
}