package com.friday.tooldriver.po.taieoc;

import com.friday.operation.api.tooldriver.dto.rpa.CodePackageDto;
import com.friday.operation.api.tooldriver.dto.rpa.GroupDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GroupPo {
    /**
     * 主键ID
     */
    private Integer id;
    /**
     * 中控租户键值
     */
    private Integer ocTenantKey;
    /**
     * 组名
     */
    private String name;
    /**
     * 组描述
     */
    private String description;
    /**
     * 是否有效
     */
    private Boolean valid;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    public GroupDto transToGroupDto(){
        return GroupDto.builder()
                .key(String.valueOf(id))
                .name(name)
                .description(description)
                .build();
    }

}
