package com.persagy.dmp.auth.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonAlias;
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",alternateNames = {"Result","result"})
	@JsonAlias({"Result","result"})
	@JsonProperty("Result")
	private String result;

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

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

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

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

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

}
