package com.zt.plat.module.qms.business.config.controller.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.zt.plat.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 存放位置分页 Request VO")
@Data
public class ConfigWarehouseLocationPageReqVO extends PageParam {

    @Schema(description = "ID", example = "31498")
    private Long id;

    @Schema(description = "父ID", example = "31498")
    private Long parentId;

    @Schema(description = "名称", example = "王五")
    private String name;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "排序号")
    private Integer sortNo;

    @Schema(description = "容量")
    private Integer capacity;

    @Schema(description = "主管部门id", example = "12738")
    private Long mainDepartmentId;

    @Schema(description = "主管部门名称", example = "张三")
    private String mainDepartmentName;

    @Schema(description = "数据类型（仓库、库位）", example = "2")
    private String dataType;

    @Schema(description = "仓库分类", example = "2")
    private String warehouseType;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "标签打印模板key")
    private String printTemplate;

    //===================扩展属性=====================
    @Schema(description = "查询时进行权限过滤")
    private String permissionFilterFlag;

    @Schema(description = "是否为管理员-可查看全部数据")
    private Boolean adminFlag;

    @Schema(description = "有权限的仓库")
    private List<Long> authorizedWarehouseIds;

    @Schema(description = "查询用-权限角色")
    private Set<Long> roleIds;

    @Schema(description = "查询用-源权限类型")
    private String srcPermissionType;
}