package com.qqchen.deploy.backend.deploy.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "团队成员信息")
public class TeamMemberDTO extends BaseDTO {

    @Schema(description = "团队ID", required = true)
    @NotNull(message = "团队ID不能为空")
    private Long teamId;

    @Schema(description = "用户ID", required = true)
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "用户名")
    private String userName;

    @Schema(description = "团队角色", example = "开发")
    private String roleInTeam;

    @Schema(description = "加入时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime joinTime;

    @Schema(description = "团队名称")
    private String teamName;
}

