package com.linkwechat.wecom.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkwechat.common.core.domain.BaseEntity;
import com.linkwechat.common.utils.SnowFlakeUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 *
 * @Author: Robin
 * @Description:
 * @Date: create in 2020/9/21 0021 23:55
 */
@ApiModel
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("we_group")
public class WeGroup extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;

    @ApiModelProperty(value = "企业id")
    @TableField(value = "corp_id")
    private String corpId;

    @ApiModelProperty(value = "群聊id")
    @TableField(value = "chat_id")
    private String chatId;

    @ApiModelProperty(value = "群名")
    @TableField(value = "group_name")
    private String groupName;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "群的创建时间")
    @TableField(value = "add_time")
    private Date addTime;

    @TableField(exist = false)
    private Long memberNum;

    @ApiModelProperty(value = "群公告")
    @TableField(value = "notice")
    private String notice;

    @ApiModelProperty(value = "群主userId")
    @TableField(value = "owner")
    private String owner;

    @ApiModelProperty(value = "0 - 正常;1 - 跟进人离职;2 - 离职继承中;3 - 离职继承完成")
    @TableField(value = "status")
    private Integer status;

    @ApiModelProperty(value = "删除标识 0 正常 1 无效")
    @TableField(value = "del_flag")
    private Integer delFlag;

    @TableField(exist = false)
    private String groupLeaderName;


    @TableField(exist = false)
    private String groupLeader;


    /**员工id*/
    @TableField(exist = false)
    @ApiModelProperty(value = "员工id")
    private String userIds;

    /**
     * 群头像
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "群头像")
    private String avatar;


}
