package com.gxwebsoft.common.system.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

/**
 * 组织机构查询参数
 *
 * @author WebSoft
 * @since 2021-08-29 20:35:09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "组织机构查询参数")
public class OrganizationParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "机构id")
    @QueryField(type = QueryType.EQ)
    private Integer organizationId;

    @Schema(description = "机构id合集")
    @TableField(exist = false)
    private Set<Integer> organizationIds;

    @Schema(description = "上级id, 0是顶级")
    @QueryField(type = QueryType.EQ)
    private Integer parentId;

    @Schema(description = "机构名称")
    private String organizationName;

    @Schema(description = "机构全称")
    private String organizationFullName;

    @Schema(description = "机构代码")
    private String organizationCode;

    @Schema(description = "机构类型(字典代码)")
    private String organizationType;

    @Schema(description = "所在省份")
    @QueryField(type = QueryType.EQ)
    private String province;

    @Schema(description = "所在城市")
    @QueryField(type = QueryType.EQ)
    private String city;

    @Schema(description = "所在辖区")
    @QueryField(type = QueryType.EQ)
    private String region;

    @Schema(description = "邮政编码")
    @QueryField(type = QueryType.EQ)
    private String zipCode;

    @Schema(description = "所属园区")
    @QueryField(type = QueryType.EQ)
    private String park;

    @Schema(description = "有所属产业的企业")
    @TableField(exist = false)
    private Boolean estateOnly;

    @Schema(description = "机构图片")
    @QueryField(type = QueryType.EQ)
    private String image;

    @Schema(description = "园区介绍")
    @QueryField(type = QueryType.EQ)
    private String about;

    @Schema(description = "联系电话")
    @QueryField(type = QueryType.EQ)
    private String phone;

    @Schema(description = "企业邮箱")
    @QueryField(type = QueryType.EQ)
    private String email;

    @Schema(description = "成立时间")
    @QueryField(type = QueryType.EQ)
    private Date establishTime;

    @Schema(description = "注册资金")
    @QueryField(type = QueryType.EQ)
    private BigDecimal registeredCapital;

    @Schema(description = "经营范围")
    @QueryField(type = QueryType.EQ)
    private String business;

    @Schema(description = "经营状态")
    @QueryField(type = QueryType.EQ)
    private Integer businessStatus;

    @Schema(description = "参保人数")
    @QueryField(type = QueryType.EQ)
    private Integer insureds;

    @Schema(description = "所属行业")
    @QueryField(type = QueryType.EQ)
    private String industry;

    @Schema(description = "负责人id")
    @QueryField(type = QueryType.EQ)
    private Integer leaderId;

    @Schema(description = "是否合作单位")
    @QueryField(type = QueryType.EQ)
    private Integer isCoop;

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

    @Schema(description = "机构类型名称")
    @TableField(exist = false)
    private String organizationTypeName;

    @Schema(description = "负责人姓名")
    @TableField(exist = false)
    private String leaderNickname;

    @Schema(description = "负责人账号")
    @TableField(exist = false)
    private String leaderUsername;

    @Schema(description = "企业及部门筛选")
    @TableField(exist = false)
    private Integer organizationIdWithChildren;

}
