All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.foxinmy.weixin4j.qy.model.ChatMute Maven / Gradle / Ivy

There is a newer version: 1.10.2
Show newest version
package com.foxinmy.weixin4j.qy.model;

import java.io.Serializable;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 成员新消息免打扰
 *
 * @className ChatMute
 * @author jinyu([email protected])
 * @date 2015年8月1日
 * @since JDK 1.6
 * @see
 */
public class ChatMute implements Serializable {

	private static final long serialVersionUID = 6734443056426236273L;

	@JSONField(name = "userid")
	private String userId;
	private int status;

	/**
	 * 默认关闭免打扰
	 *
	 * @param userid
	 */
	public ChatMute(String userId) {
		this.userId = userId;
	}

	/**
	 * 传入true时开启免打扰
	 *
	 * @param userId
	 *            成员userid
	 * @param status
	 *            是否开启免打扰
	 */
	public ChatMute(String userId, boolean status) {
		this.userId = userId;
		this.status = status ? 1 : 0;
	}

	public String getUserId() {
		return userId;
	}

	public int getStatus() {
		return status;
	}

	@JSONField(serialize = false)
	public boolean getFormatStatus() {
		return status == 1;
	}

	@Override
	public String toString() {
		return "ChatMute [userId=" + userId + ", status=" + status + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy