# ScheduleDepartmentDTO.java

    package cloud.wconnect.workperformance.pojo.dto.schedule;

    import cloud.wconnect.commonlib.pojo.dto.jsonview.Views;
    import com.fasterxml.jackson.annotation.JsonView;
    import lombok.Data;

    import java.util.List;

    /**
     * DTO：部门排班
     *
     * @author yyt
     * 2023/6/29
     */
    @Data
    public class ScheduleDepartmentDTO {

        /**
         * 部门 id
         */
        @JsonView({Views.ListView.class, Views.DetailsView.class})
        private Integer id;

        /**
         * 部门名称
         */
        @JsonView({Views.ListView.class, Views.DetailsView.class})
        private String name;

        /**
         * 部门 code
         */
        @JsonView({Views.ListView.class, Views.DetailsView.class})
        private String departmentCode;

        /**
         * 排序编号
         */
        @JsonView({Views.ListView.class, Views.DetailsView.class})
        private Integer sort;

        /**
         * 是否可编辑
         */
        @JsonView(Views.ListView.class)
        private Boolean canWrite;

        /**
         * 员工信息
         */
        @JsonView(Views.ListView.class)
        private List<ScheduleDepartmentEmployeeDTO> employees;

        /**
         * 可读权限配置
         */
        @JsonView(Views.DetailsView.class)
        private List<ScheduleDepartmentPermissionConfigDTO> read;

        /**
         * 可改权限配置
         */
        @JsonView(Views.DetailsView.class)
        private List<ScheduleDepartmentPermissionConfigDTO> write;

        public ScheduleDepartmentDTO(){}

        public ScheduleDepartmentDTO(Integer id, String name, Integer sort, Boolean canWrite,
                                     List<ScheduleDepartmentEmployeeDTO> employees) {
            this.sort = sort;
            this.id = id;
            this.name = name;
            this.canWrite = canWrite;
            this.employees = employees;
        }

    }