package go.kr.project.system.auth.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import go.kr.project.common.model.PagingVO;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * packageName    : go.kr.project.system.auth.model
 * fileName       : GroupRoleVO
 * author         : 시스템 관리자
 * date           : 2023-06-15
 * description    : 그룹-역할 매핑 정보를 담는 VO 클래스
 * ===========================================================
 * DATE              AUTHOR             NOTE
 * -----------------------------------------------------------
 * 2023-06-15        시스템 관리자       최초 생성
 */
@EqualsAndHashCode(callSuper=true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class GroupRoleVO extends PagingVO {

    @Size(max = 20)
    @NotNull
    private String groupId;

    @Size(max = 20)
    @NotNull
    private String roleId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Seoul")
    private LocalDateTime regDttm;

    @Size(max = 10)
    private String rgtr;

    // 추가 필드 - 조회용
    private String groupNm;
    private String groupDc;
    private String roleNm;
    private String roleDc;
    private String useYn;
}
