package com.yaoai.api.dto.team;

import com.yaoai.domain.entity.TeamGroup;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class TeamGroupDTO {

    private Long id;
    private String name;
    private String description;
    private List<Long> memberIds;
    private LocalDateTime createdAt;

    public static TeamGroupDTO from(TeamGroup g, List<Long> memberIds) {
        TeamGroupDTO dto = new TeamGroupDTO();
        dto.setId(g.getId());
        dto.setName(g.getName());
        dto.setDescription(g.getDescription());
        dto.setMemberIds(memberIds);
        dto.setCreatedAt(g.getCreatedAt());
        return dto;
    }
}
