package com.yonge.cooleshow.biz.dal.wrapper.im;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.MK;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * Created by Eric.Shang on 2022/10/17.
 */
public class ImUserWrapper {

    /**
     * IM好友用户列表
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ImUserFriend implements Serializable {

        @ApiModelProperty(value = "主键;")
        private Long id;

        @ApiModelProperty(value = "当前用户编号")
        private Long userId;

        @ApiModelProperty(value = "好友编号")
        private Long friendId;

        @ApiModelProperty(value = "IM用户ID")
        private String imFriendId;

        @ApiModelProperty(value = "好友头像")
        private String friendAvatar;

        @ApiModelProperty(value = "好友昵称")
        private String friendNickname;

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

        @ApiModelProperty(value = "创建时间;")
        @JsonFormat(pattern = MK.TIME_PATTERN, timezone = MK.TIME_ZONE)
        private Date createTime;

        @ApiModelProperty(value = "修改时间;")
        @JsonFormat(pattern = MK.TIME_PATTERN, timezone = MK.TIME_ZONE)
        private Date updateTime;

        @ApiModelProperty("好友身份")
        private ClientEnum roleType;

        @ApiModelProperty(value = "好友身份")
        private ClientEnum friendType;

        public ClientEnum getRoleType() {
            return getFriendType();
        }


        public ImUserFriend friendType(ClientEnum friendType) {
            this.friendType = friendType;
            return this;
        }
    }

}
