package com.yuchen.saas.manage.system.api.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import org.nest.springwrap.core.tenant.mp.TenantEntity;

import java.util.Date;


@Data
@TableName("nest_dept")
@ApiModel(value = "Dept对象", description = "Dept对象")
public class Dept extends TenantEntity {

    private static final long serialVersionUID = 1L;



    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "父主键")
    private Long parentId;


    @ApiModelProperty(value = "机构名")
    private String deptName;


    @ApiModelProperty(value = "机构全称")
    private String fullName;


    @ApiModelProperty(value = "祖级机构主键")
    private String ancestors;


    @ApiModelProperty(value = "机构类型")
    private Integer deptCategory;


    @ApiModelProperty(value = "排序")
    private Integer sort;


    @ApiModelProperty(value = "备注")
    private String remark;


    @TableLogic
    @ApiModelProperty(value = "是否已删除")
    private Integer isDeleted;

	@ApiModelProperty(value = "是否默认")
	private Integer isDefault;

    @ApiModelProperty(value = "是否运营商：0不是 1是")
    private Integer isOperator;

    @ApiModelProperty(value = "认证状态:0未认证,1已认证,2已过期(V-rebuild1.0新增),3认证中")
    private Integer cerStatus;

    /**
     * 机构类型
     */
    @ApiModelProperty(value = "机构类型")
    private String organType;

    /**
     * 统一信用代码
     */
    @ApiModelProperty(value = "统一信用代码")
    private String creditCode;

    /**
     * 法人
     */
    @ApiModelProperty(value = "法人")
    private String legalPerson;

    /**
     * 所属行业
     */
    @ApiModelProperty(value = "所属行业")
    private String organTrade;

    /**
     * 组织规模
     */
    @ApiModelProperty(value = "组织规模")
    private String organScope;

    /**
     * 我的职务
     */
    @ApiModelProperty(value = "我的职务")
    private String myPosition;

    /**
     * 省
     */
    @ApiModelProperty(value = "省")
    private String provinceCode;

    /**
     * 市
     */
    @ApiModelProperty(value = "市")
    private String cityCode;

    /**
     * 区/县
     */
    @ApiModelProperty(value = "区/县")
    private String countyCode;

    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "证件类型")
    private Integer documentType;
    @ApiModelProperty(value = "证件号码")
    private String documentNumber;
    /**
     * 营业执照
     */
    @ApiModelProperty(value = "营业执照")
    private String businessFile;

    /**
     * 审核状态（0 待审核 1 进行中 2 已完成 3 已撤回 4 已拒绝））
     */
    @ApiModelProperty(name = "reviewState", value = "审核状态（0 待审核 1 进行中 2 已完成 3 已撤回 4 已拒绝）")
    private Integer reviewState;

    /**
     * 审核用户账号id
     */
    @ApiModelProperty(value = "审核用户账号id")
    private Long reviewUserId;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    private Date reviewTime;


    @ApiModelProperty(value = "添加来源:0系统,1小程序,2公众号申请")
    private Integer source;


    @ApiModelProperty(value = "创建组织的userId")
    private Long userId;

    @ApiModelProperty(value = "任务对应的业务数据表id")
    private String ruApprovalDataId;

    @ApiModelProperty(value = "审核备注")
    private String reviewRemark;

    @ApiModelProperty(value = "部门直属组织deptId")
    private Long directlyDeptId;

    @ApiModelProperty(value = "企业联系人")
    private String linkMan;

    /**
     * 企业联系人手机
     */
    @ApiModelProperty(value = "企业联系方式(部门联系方式)")
    private String phone;

    /**
     * 2023年9月26日18:02:48需求调整成一个部门可以有多个主管
     */
    @Deprecated
    @ApiModelProperty(value = "部门主管orgUserId")
    private Long deptOrgUserId;

    @ApiModelProperty(value = "简介")
    private String intro;

    @ApiModelProperty(value = "认证详情id(认证主体)")
    private Long deptDetailId;

    @ApiModelProperty(value = "运营商是否删除 1删除 0未删除")
    private Integer isOperatorDelete;

    @ApiModelProperty(value = "运营商是否启用 1停用 0未停用")
    private Integer isOperatorUsed;

    @ApiModelProperty(value = "原运营商是否删除 1删除 0未删除")
    private Integer isOperatorDeleteOld;

    @ApiModelProperty(value = "原运营商是否启用 1停用 0未停用")
    private Integer isOperatorUsedOld;
    @ApiModelProperty(value = "运营商类型")
    private Integer operatorType;


    @ApiModelProperty(value = "V-rebuild1.0是否冻结:0否1是")
    private Integer isFrozen;

    @ApiModelProperty(value = "V-rebuild1.0是否注销:0否1是")
    private Integer isRemove;

    @ApiModelProperty(value = "V-rebuild1.0客服手机")
    private String customerPhone;

    @ApiModelProperty(value = "添加方式,0")
    private Integer addType;

    @ApiModelProperty(name = "type", value = "部门类型:0内部,1外部,2下级")
    private Integer type;

    @ApiModelProperty(value = "来源组织id()")
    private Long sourceDeptId;

    @ApiModelProperty(value = "来源部门直属组织deptId")
    private Long sourceDirectlyDeptId;

    @ApiModelProperty(name = "isOpenService", value = "是否开通服务0否1是")
    private Integer isOpenService;

    @ApiModelProperty(value = "添加来源应用id")
    private Long applyId;
}
