package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 组织机构
 *
 * @author WebSoft
 * @since 2020-03-14 11:29:04
 */
@Data
@Schema(description = "组织机构")
@TableName("sys_organization")
public class Organization implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "机构id")
    @TableId(type = IdType.AUTO)
    private Integer organizationId;

    @Schema(description = "上级id, 0是顶级")
    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 = "所在省份")
    private String province;

    @Schema(description = "所在城市")
    private String city;

    @Schema(description = "所在辖区")
    private String region;

    @Schema(description = "邮政编码")
    private String zipCode;

    @Schema(description = "所属园区")
    private String park;

    @Schema(description = "机构图片")
    private String image;

    @Schema(description = "园区介绍")
    private String about;

    @Schema(description = "联系电话")
    private String phone;

    @Schema(description = "企业邮箱")
    private String email;

    @Schema(description = "成立时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date establishTime;

    @Schema(description = "注册资金")
    private BigDecimal registeredCapital;

    @Schema(description = "经营范围")
    private String business;

    @Schema(description = "经营状态")
    private String businessStatus;

    @Schema(description = "参保人数")
    private Integer insureds;

    @Schema(description = "所属行业")
    private String industry;

    @Schema(description = "所属产业")
    private String estate;

    @Schema(description = "负责人id")
    private Integer leaderId;

    @Schema(description = "是否合作单位")
    private Integer isCoop;

    @Schema(description = "是否办公室主任")
    private Integer isChief;

    @Schema(description = "法定代表人")
    private String legalPerson;

    @Schema(description = "成立日期")
    private String setUpDate;

    @Schema(description = "企业标签")
    private String tag;

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

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

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

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

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

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

}
