package com.yuchen.saas.park.api.entity.park;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkunion.park.service.common.entity.BasicEntity;
import com.yuchen.saas.park.api.dto.property.PropertyHousesDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author 刘通
 * @date 2020/12/8 9:53
 */
@Data
@TableName("pmg_bat_park_people")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "人员对象", description = "园内人员信息表")
public class PmgBatParkPeople extends BasicEntity {
    /**
     * 名字
     */
    @ApiModelProperty(value = "名字")
    private String name;
    /**
     * 人脸图片路径
     */
    @ApiModelProperty(value = "人脸图片路径")
    private String imgsrc;
    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    private String sex;
    /**
     * 身份ID
     */
    @ApiModelProperty(value = "身份ID")
    private String idCard;
    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    private String phone;
    /**
     * 公司
     */
    @ApiModelProperty(value = "公司ID")
    private Long company;
    /**
     * 人员类型
     */
    @ApiModelProperty(value = "人员类型")
    private Long peopleType;

    /**
     * 人员组织code orgIndexCode
     */
    private String orgIndexCode;

    /**
     * 人员类型
     */
    @ApiModelProperty(value = "人员类型")
    private String type;
    /**
     * 类型选项
     */
    @ApiModelProperty(value = "类型选项")
    private String category;
    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号")
    private String license;
    /**
     * 下发状态
     */
    @ApiModelProperty(value = "下发状态")
    private String snStatus;
    /**
     * 海康人员ID
     */
    @ApiModelProperty(value = "海康人员ID")
    private String personId;
    /**
     * 海康人脸ID
     */
    @ApiModelProperty(value = "海康人脸ID")
    private String faceId;
    /**
     * 人脸应用-人脸的唯一标识
     */
    @ApiModelProperty(value = "人脸应用-人脸的唯一标识")
    private String indexCode;
    /**
     * 年龄字段
     */
    @ApiModelProperty(value = "年龄")
    private Integer age;
    /**
     * 服务来源(1:新ISC、2:旧ISC)
     */
    @ApiModelProperty(value = "服务来源(1:新ISC、2:旧ISC) 3：组织架构 4:伙伴人员 5：外部人员")
    private Integer serviceSource;

    /***********************  3D/bi  **********************/

    @ApiModelProperty(value = "楼栋id")
    private Long buildingId;

    @ApiModelProperty(value = "楼层id")
    private Long floorId;

    @ApiModelProperty(value = "房间id")
    private Long roomId;

    @ApiModelProperty(value = "证件类型")
    private String idType;

    @ApiModelProperty(value = "住户照片")
    private String photo;

    @ApiModelProperty(value = "证件照片")
    private String idPhoto;

    @ApiModelProperty(value = "证件照片反面")
    private String idPhotoBack;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "证件有效期")
    private Date idExpireDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "有效期")
    private Date expireDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "证件起始日期")
    private Date idStartDate;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "起始日期")
    private Date startDate;


    @ApiModelProperty(value = "紧急联系人")
    private String emergencyContact;

    @ApiModelProperty(value = "紧急联系电话")
    private String emergencyPhone;

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

    @ApiModelProperty(value = "单元id")
    private Long buildingUnitId;

    @ApiModelProperty(value = "社区名称")
    private String parkName;

    @ApiModelProperty(value = "楼栋名称")
    private String buildingName;

    @ApiModelProperty(value = "单元名称")
    private String buildingUnitName;

    @ApiModelProperty(value = "楼层名称")
    private String floorName;

    @ApiModelProperty(value = "房间名称")
    private String roomName;

    /**
     * 人员状态
     */
    @ApiModelProperty(value = "人员状态 1：未生效 2：生效中 3：已失效")
    private Integer personStatus;
    /*
     * 绑定账号
     */
    @ApiModelProperty(value = "绑定账号 1:已绑定 2：未绑定 3：已失效")
    private Integer bindUser;

    @TableField(exist = false)
    @ApiModelProperty(value = "房源列表")
    private List<PropertyHousesDto> housesList;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否为企业")
    private Integer ownerType;

    @TableField(exist = false)
    @ApiModelProperty(value = "人员大类")
    private String bigType;


    @ApiModelProperty(value = "是否为企业")
    private Integer isCompany;

    @ApiModelProperty(value = "联系人")
    private String contactPerson;

    @ApiModelProperty(value = "法定代表人")
    private String legalPerson;

    @ApiModelProperty(value = "机构类型")
    private Long orgType;

    @ApiModelProperty(value = "所属行业")
    private Long companyTrade;

    @ApiModelProperty(value = "资源代码")
    private String resourceCode;

    @ApiModelProperty(value = "人员二级类型ID")
    private Long peopleSubType;

    @ApiModelProperty(value = "关联人员ID")
    private Long relatedPerson;

    @ApiModelProperty(value = "绑定状态 1：已绑定 2：未绑定 3：已失效")
    private Integer bindStatus;

    @ApiModelProperty(value = "绑定账号")
    private String bindAccount;

    @ApiModelProperty(value = "租赁状态 1：生效中 2：未生效 3：已失效")
    private Integer rentStatus;

    @ApiModelProperty(value = "人员标签")
    private String personTag;

    @ApiModelProperty(value = "最后一次同步人员到电梯人员的时间")
    private Date lastSyncElevatorTime;

    @ApiModelProperty(value = "最后一次同步人员到门禁人员的时间")
    private Date lastSyncDoorTime;

    @ApiModelProperty(value = "是否是楼栋管家 1是 0否")
    private Integer isBuildingManager;

    @ApiModelProperty(value = "是否是楼栋工程师 1是 0否")
    private Integer isBuildingEngineer;


    @ApiModelProperty(value = "房屋产权证明文件")
    private String propertyFiles;


    @ApiModelProperty(value = "附件")
    private String attachments;


}
