package com.persagy.dmp.auth.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@Data
@ToString
@EqualsAndHashCode
public class ResultReturn<T> {

	/**返回状态：success,failure*/
	@JSONField(name = "Result")
	@JsonProperty("Result")
	private String result;

	/**返回一个对象时使用*/
	@JSONField(name = "Item")
	@JsonProperty("Item")
	private T item;

	/**返回集合时使用*/
	@JSONField(name = "Content")
	@JsonProperty("Content")
	private List<T> content;

	/**返回状态的具体信息*/
	@JSONField(name = "ResultMsg")
	@JsonProperty("ResultMsg")
	private String resultMsg;

	/**返回状态码*/
	@JSONField(name = "ResultCode")
	@JsonProperty("ResultCode")
	private Integer resultCode;

	/**返回集合的长度*/
	@JSONField(name = "Count")
	@JsonProperty("Count")
	private Integer count;

}
