package com.engine.salary.entity.salarysob.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 薪资审批设置列表
 * <p>Copyright: Copyright (c) 2024</p>
 * <p>Company: 泛微软件</p>
 *
 * @author xuzhuoyan
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryApprovalDTO {

    // 主键id
    private Long id;

    // 薪资账套id
    private Long salarySobId;

    // 是否开启审批
    private Boolean isOpenApproval;

    // 审批流程地址
    private String approvalWorkflowUrl;

    // 审批项目信息
    private List<approvalItemGroup> approvalItemGroup;

    private Boolean canEdit;

    /**
     * 审批项目信息分组形式
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class approvalItemGroup {

        // 分组名称
        private String groupName;

        // 项目信息
        private List<approvalItem> approvalItems;

        // 排序
        private Integer sorted;
    }

    /**
     * 审批薪资项目
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class approvalItem {
        // 薪资项目id
        private Long salaryItemId;

        // 薪资项目名称
        private String salaryItemName;

        // 排序
        private Integer sorted;

    }
}
